We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5fb17a6 commit a86e129Copy full SHA for a86e129
src/jsontestrunner/CMakeLists.txt
@@ -1,4 +1,13 @@
1
-find_package(PythonInterp 2.6)
+if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.12.0)
2
+ # The new Python3 module is much more robust than the previous PythonInterp
3
+ find_package (Python3 COMPONENTS Interpreter)
4
+ # Set variables for backwards compatibility with cmake < 3.12.0
5
+ set(PYTHONINTERP_FOUND ${Python3_Interpreter_FOUND})
6
+ set(PYTHON_EXECUTABLE ${Python3_EXECUTABLE})
7
+else()
8
+ set(Python_ADDITIONAL_VERSIONS 3.8)
9
+ find_package(PythonInterp 3)
10
+endif()
11
12
add_executable(jsontestrunner_exe
13
main.cpp
0 commit comments