However, it fails to find Development directory, but it works if I put manually the path to it after.
Here is the content of the variables after calling it:
I think the problem is related to the lib64 directory name. In normal situation, this directory is searched but can be controlled by FIND_LIBRARY_USE_LIB64_PATHS variable. Maybe your CMake environment set this variable with the wrong value…
It seems that even if I manually force FIND_LIBRARY_USE_LIB64_PATHS to true, it still does not work. However, using CMAKE_FIND_LIBRARY_CUSTOM_LIB_SUFFIX=64 makes it work well, so I will use this for the moment.
It’s GCC 11.4.1, but is seems that at the first call to find python, compiler version is still undefined. It looks like the call is not linked to any direct binary generation and is done only to collect information, so I guess that explain the behaviour.