Skip to content

Commit

Permalink
ENH: Move to requiring python 3
Browse files Browse the repository at this point in the history
  • Loading branch information
hjmjohnson authored and cdunn2001 committed Nov 7, 2019
1 parent 5fb17a6 commit a86e129
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/jsontestrunner/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
find_package(PythonInterp 2.6)
if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.12.0)
# The new Python3 module is much more robust than the previous PythonInterp
find_package (Python3 COMPONENTS Interpreter)
# Set variables for backwards compatibility with cmake < 3.12.0
set(PYTHONINTERP_FOUND ${Python3_Interpreter_FOUND})
set(PYTHON_EXECUTABLE ${Python3_EXECUTABLE})
else()
set(Python_ADDITIONAL_VERSIONS 3.8)
find_package(PythonInterp 3)
endif()

add_executable(jsontestrunner_exe
main.cpp
Expand Down

0 comments on commit a86e129

Please sign in to comment.