Allow overriding of Python interpreter

* Calling `python` does not allow overriding
  downstream when running tests.
This commit is contained in:
David Seifert
2018-08-18 22:06:25 +02:00
committed by Martin Hořeňovský
parent 1cdaa48a0b
commit 7f18282d17
2 changed files with 5 additions and 1 deletions

View File

@@ -36,7 +36,11 @@ if(USE_WMAIN)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:wmainCRTStartup")
endif()
find_package(PythonInterp)
if (BUILD_TESTING AND CATCH_BUILD_TESTING AND NOT_SUBPROJECT)
if (NOT PYTHONINTERP_FOUND)
message(FATAL_ERROR "Python not found, but required for tests")
endif()
add_subdirectory(projects)
endif()