Skip to content

Commit

Permalink
Set CMake policy before FindPython3 is called.
Browse files Browse the repository at this point in the history
  • Loading branch information
bcoconni committed Mar 25, 2023
1 parent ae9a44c commit 8a6ebac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,11 @@ option(INSTALL_JSBSIM_PYTHON_MODULE "Set to ON to install the Python module for

if (BUILD_PYTHON_MODULE)
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/python/CMakeModules)
cmake_policy(SET CMP0094 NEW) # makes FindPython3 prefer activated virtualenv Python to the latest version
find_package(Python3 COMPONENTS Interpreter Development)
find_package(Cython)

if (CYTHON_FOUND)
cmake_policy(SET CMP0094 NEW) # makes FindPython3 prefer activated virtualenv Python to the latest version
if (Python3_Development_FOUND)
enable_testing()
add_subdirectory(tests)
Expand Down

0 comments on commit 8a6ebac

Please # to comment.