diff --git a/CMakeLists.txt b/CMakeLists.txt index 085ba0ca..282cc9be 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -43,9 +43,9 @@ endif() if (BUILD_TESTING AND CATCH_BUILD_TESTING AND NOT_SUBPROJECT) find_package(Python3 COMPONENTS Interpreter) -# if (NOT PYTHONINTERP_FOUND) -# message(FATAL_ERROR "Python not found, but required for tests") -# endif() + if (NOT Python_Interpreter_FOUND) + message(FATAL_ERROR "Python not found, but required for tests") + endif() add_subdirectory(projects) endif() diff --git a/projects/CMakeLists.txt b/projects/CMakeLists.txt index ee8f1013..c76a75a3 100644 --- a/projects/CMakeLists.txt +++ b/projects/CMakeLists.txt @@ -402,7 +402,7 @@ add_test(NAME FilteredSection-2 COMMAND $ \#1394\ nested - set_tests_properties(FilteredSection-2 PROPERTIES FAIL_REGULAR_EXPRESSION "No tests ran") # AppVeyor has a Python 2.7 in path, but doesn't have .py files as autorunnable -add_test(NAME ApprovalTests COMMAND ${PYTHON_EXECUTABLE} ${CATCH_DIR}/scripts/approvalTests.py $) +add_test(NAME ApprovalTests COMMAND ${Python_EXECUTABLE} ${CATCH_DIR}/scripts/approvalTests.py $) set_tests_properties(ApprovalTests PROPERTIES FAIL_REGULAR_EXPRESSION "Results differed") add_test(NAME RegressionCheck-1670 COMMAND $ "#1670 regression check" -c A -r compact)