We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents eb4f2b1 + a53ab62 commit 5276a67Copy full SHA for 5276a67
CMakeLists.txt
@@ -179,11 +179,10 @@ message(STATUS "Build tests: ${BUILD_TESTING}")
179
if(BUILD_TESTING)
180
set(_msg "Looking for Python3 needed for summary tests")
181
message(STATUS "${_msg}")
182
- # find_package(PythonInterp 3) cannot be used because /usr/bin/python may be
183
- # a Python2 interpreter.
184
- find_program(PYTHON_EXECUTABLE python3)
185
- if(PYTHON_EXECUTABLE)
186
- message(STATUS "${_msg} - found")
+ set(Python3_FIND_STRATEGY LOCATION)
+ find_package(Python3 COMPONENTS Interpreter)
+ if(Python3_Interpreter_FOUND )
+ message(STATUS "${_msg} - found: ${Python3_VERSION}")
187
else()
188
message(STATUS "${_msg} - not found (skipping summary tests)")
189
endif()
0 commit comments