diff options
author | Marc Chevrier <marc.chevrier@gmail.com> | 2023-06-13 15:46:32 (GMT) |
---|---|---|
committer | Marc Chevrier <marc.chevrier@gmail.com> | 2023-06-15 13:28:55 (GMT) |
commit | 711d1da1255a028947d1117852caa8f33604bd81 (patch) | |
tree | 64d65a0b31f6afa50f56cec6923e8875360a2f72 /Tests/UseSWIG/AlternateLibraryName | |
parent | 883cbf41710ce3a4c4798f9ced93681ec87115cc (diff) | |
download | CMake-711d1da1255a028947d1117852caa8f33604bd81.zip CMake-711d1da1255a028947d1117852caa8f33604bd81.tar.gz CMake-711d1da1255a028947d1117852caa8f33604bd81.tar.bz2 |
FindPython: add capability to select python version for the tests
Diffstat (limited to 'Tests/UseSWIG/AlternateLibraryName')
-rw-r--r-- | Tests/UseSWIG/AlternateLibraryName/CMakeLists.txt | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Tests/UseSWIG/AlternateLibraryName/CMakeLists.txt b/Tests/UseSWIG/AlternateLibraryName/CMakeLists.txt index a2c239c..f20593c 100644 --- a/Tests/UseSWIG/AlternateLibraryName/CMakeLists.txt +++ b/Tests/UseSWIG/AlternateLibraryName/CMakeLists.txt @@ -7,7 +7,7 @@ include(CTest) find_package(SWIG REQUIRED) include(${SWIG_USE_FILE}) -find_package(Python2 REQUIRED COMPONENTS Interpreter Development) +find_package(Python REQUIRED COMPONENTS Interpreter Development) # Path separator if (WIN32) @@ -27,9 +27,9 @@ swig_add_library(example_python set_target_properties (example_python PROPERTIES INCLUDE_DIRECTORIES "${CMAKE_CURRENT_SOURCE_DIR}/.." SWIG_USE_TARGET_INCLUDE_DIRECTORIES TRUE) -target_link_libraries(example_python PRIVATE Python2::Python) +target_link_libraries(example_python PRIVATE Python::Python) add_test (NAME AlternateLibraryName.example1 COMMAND "${CMAKE_COMMAND}" -E env "PYTHONPATH=${CMAKE_CURRENT_BINARY_DIR}${PS}$<TARGET_FILE_DIR:example_python>" - "${Python2_EXECUTABLE}" "${CMAKE_CURRENT_SOURCE_DIR}/../runme.py") + "${Python_EXECUTABLE}" "${CMAKE_CURRENT_SOURCE_DIR}/../runme.py") |