Python Interpreter found but Python_EXECUTABLE not populated

You are right about the sscce, I will show it later today when I get home if needed.

As far as I understand CMake does its introspection thing and detects python by itself. I don’t explicitly call find_package(). I assume that my commands run after that phase where I would have expected Python_EXECUTABLE to have been populated since it says it has found the Python Interpreter.

What I can tell you from memory is that the add_custom_command is in root_dir/tests/CMakeLists.txt and there is a line in root_dir/CMakeLists.txt that would add_subdirectory(tests). The root CMakeLists.txt doesn’t do much apart from defining version and adding subdirectories.