diff options
author | Daniel Mensinger <daniel@mensinger-ka.de> | 2020-08-03 20:47:21 +0200 |
---|---|---|
committer | Daniel Mensinger <daniel@mensinger-ka.de> | 2020-08-03 20:47:21 +0200 |
commit | f16149cc4985fc1b35bf7b9435de9b9f52431175 (patch) | |
tree | 536980e66dd62867499824bdfdb30193e3c21c37 /test cases/cmake | |
parent | 1c1ec9ff11a0f49c000b728781aab447a0776e2f (diff) | |
download | meson-f16149cc4985fc1b35bf7b9435de9b9f52431175.zip meson-f16149cc4985fc1b35bf7b9435de9b9f52431175.tar.gz meson-f16149cc4985fc1b35bf7b9435de9b9f52431175.tar.bz2 |
cmake: Only run the cmake_module_path test for CMake >= 3.12
Diffstat (limited to 'test cases/cmake')
-rw-r--r-- | test cases/cmake/11 cmake_module_path/cmake/FindSomethingLikePython.cmake | 17 | ||||
-rw-r--r-- | test cases/cmake/11 cmake_module_path/test.json | 5 |
2 files changed, 6 insertions, 16 deletions
diff --git a/test cases/cmake/11 cmake_module_path/cmake/FindSomethingLikePython.cmake b/test cases/cmake/11 cmake_module_path/cmake/FindSomethingLikePython.cmake index 4a189bf..0c663f4 100644 --- a/test cases/cmake/11 cmake_module_path/cmake/FindSomethingLikePython.cmake +++ b/test cases/cmake/11 cmake_module_path/cmake/FindSomethingLikePython.cmake @@ -1,24 +1,9 @@ cmake_policy(VERSION 3.7) -if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.12) - find_package(Python COMPONENTS Interpreter) -else() - find_package(PythonInterp) -endif() - +find_package(Python COMPONENTS Interpreter) if(Python_FOUND OR PYTHONINTERP_FOUND) set(SomethingLikePython_FOUND ON) set(SomethingLikePython_EXECUTABLE ${Python_EXECUTABLE}) - - if(NOT DEFINED Python_VERSION) - set(Python_VERSION ${Python_VERSION_STRING}) - endif() - if(NOT TARGET Python::Interpreter) - add_executable(Python::Interpreter IMPORTED) - set_target_properties(Python::Interpreter PROPERTIES - IMPORTED_LOCATION ${Python_EXECUTABLE} - VERSION ${Python_VERSION}) - endif() else() set(SomethingLikePython_FOUND OFF) endif() diff --git a/test cases/cmake/11 cmake_module_path/test.json b/test cases/cmake/11 cmake_module_path/test.json new file mode 100644 index 0000000..79a2b60 --- /dev/null +++ b/test cases/cmake/11 cmake_module_path/test.json @@ -0,0 +1,5 @@ +{ + "tools": { + "cmake": ">=3.12" + } +} |