Open barracuda156 opened 10 months ago
Okay, this works:
if(USE_PYTHON)
if(${CMAKE_VERSION} VERSION_GREATER_EQUAL 3.18)
find_package(Python3 3.11 REQUIRED EXACT COMPONENTS Development.Module)
find_package(Python3 3.11 EXACT COMPONENTS Interpreter Development.Embed)
else()
find_package(Python3 3.11 REQUIRED EXACT COMPONENTS Interpreter Development)
endif()
The build picks Python at random, ignoring configure args like
-DPYTHON_EXECUTABLE=
,-DPYTHON3_EXECUTABLE=
and whatever I tried so far.This is rather a CMake bug, but maybe a configure option can be provided to select a specific Python rather than relying on a defunct CMake module? See, for instance: https://gitlab.kitware.com/cmake/cmake/-/issues/23139