mirror of
https://github.com/catchorg/Catch2.git
synced 2025-08-03 05:45:39 +02:00
Replace deprecated FindPythonInterp with FindPython3
fix #2755 https://cmake.org/cmake/help/v3.16/module/FindPythonInterp.html
This commit is contained in:

committed by
Chris Thrasher

parent
ac207fc90f
commit
334827eb53
@@ -342,10 +342,9 @@ set_tests_properties(FilteredSection::GeneratorsDontCauseInfiniteLoop-2
|
||||
PASS_REGULAR_EXPRESSION "All tests passed \\(4 assertions in 1 test case\\)"
|
||||
)
|
||||
|
||||
# AppVeyor has a Python 2.7 in path, but doesn't have .py files as autorunnable
|
||||
add_test(NAME ApprovalTests
|
||||
COMMAND
|
||||
${PYTHON_EXECUTABLE}
|
||||
Python3::Interpreter
|
||||
${CATCH_DIR}/tools/scripts/approvalTests.py
|
||||
$<TARGET_FILE:SelfTest>
|
||||
"${CMAKE_CURRENT_BINARY_DIR}"
|
||||
@@ -408,7 +407,7 @@ set_tests_properties(TagAlias PROPERTIES
|
||||
FAIL_REGULAR_EXPRESSION "0 matching test cases"
|
||||
)
|
||||
|
||||
add_test(NAME RandomTestOrdering COMMAND ${PYTHON_EXECUTABLE}
|
||||
add_test(NAME RandomTestOrdering COMMAND Python3::Interpreter
|
||||
${CATCH_DIR}/tests/TestScripts/testRandomOrder.py $<TARGET_FILE:SelfTest>)
|
||||
set_tests_properties(RandomTestOrdering
|
||||
PROPERTIES
|
||||
@@ -417,7 +416,7 @@ set_tests_properties(RandomTestOrdering
|
||||
|
||||
add_test(NAME CheckConvenienceHeaders
|
||||
COMMAND
|
||||
${PYTHON_EXECUTABLE} ${CATCH_DIR}/tools/scripts/checkConvenienceHeaders.py
|
||||
Python3::Interpreter ${CATCH_DIR}/tools/scripts/checkConvenienceHeaders.py
|
||||
)
|
||||
set_tests_properties(CheckConvenienceHeaders
|
||||
PROPERTIES
|
||||
@@ -602,7 +601,7 @@ if(CATCH_ENABLE_CONFIGURE_TESTS)
|
||||
"ExperimentalRedirect")
|
||||
add_test(NAME "CMakeConfig::${testName}"
|
||||
COMMAND
|
||||
"${PYTHON_EXECUTABLE}" "${CMAKE_CURRENT_LIST_DIR}/TestScripts/testConfigure${testName}.py" "${CATCH_DIR}" "${CMAKE_CURRENT_BINARY_DIR}"
|
||||
Python3::Interpreter "${CMAKE_CURRENT_LIST_DIR}/TestScripts/testConfigure${testName}.py" "${CATCH_DIR}" "${CMAKE_CURRENT_BINARY_DIR}"
|
||||
)
|
||||
set_tests_properties("CMakeConfig::${testName}"
|
||||
PROPERTIES
|
||||
@@ -615,7 +614,7 @@ endif()
|
||||
if(CATCH_ENABLE_CMAKE_HELPER_TESTS)
|
||||
add_test(NAME "CMakeHelper::DiscoverTests"
|
||||
COMMAND
|
||||
"${PYTHON_EXECUTABLE}" "${CMAKE_CURRENT_LIST_DIR}/TestScripts/DiscoverTests/VerifyRegistration.py" "${CATCH_DIR}" "${CMAKE_CURRENT_BINARY_DIR}"
|
||||
Python3::Interpreter "${CMAKE_CURRENT_LIST_DIR}/TestScripts/DiscoverTests/VerifyRegistration.py" "${CATCH_DIR}" "${CMAKE_CURRENT_BINARY_DIR}"
|
||||
)
|
||||
set_tests_properties("CMakeHelper::DiscoverTests"
|
||||
PROPERTIES
|
||||
|
Reference in New Issue
Block a user