diff options
-rw-r--r-- | Modules/FindCxxTest.cmake | 8 | ||||
-rw-r--r-- | Tests/RunCMake/UseSWIG/BasicConfiguration.cmake | 7 | ||||
-rw-r--r-- | Tests/RunCMake/UseSWIG/BasicPython.cmake | 2 | ||||
-rw-r--r-- | Tests/Server/CMakeLists.txt | 4 |
4 files changed, 10 insertions, 11 deletions
diff --git a/Modules/FindCxxTest.cmake b/Modules/FindCxxTest.cmake index 2aa5f6f..25454fd 100644 --- a/Modules/FindCxxTest.cmake +++ b/Modules/FindCxxTest.cmake @@ -196,7 +196,7 @@ if(NOT DEFINED CXXTEST_TESTGEN_ARGS) set(CXXTEST_TESTGEN_ARGS --error-printer) endif() -find_package(PythonInterp QUIET) +find_package(Python QUIET) find_package(Perl QUIET) find_path(CXXTEST_INCLUDE_DIR cxxtest/TestSuite.h) @@ -206,17 +206,17 @@ find_program(CXXTEST_PYTHON_TESTGEN_EXECUTABLE find_program(CXXTEST_PERL_TESTGEN_EXECUTABLE cxxtestgen.pl PATHS ${CXXTEST_INCLUDE_DIR}) -if(PYTHONINTERP_FOUND OR PERL_FOUND) +if(PYTHON_FOUND OR PERL_FOUND) include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) - if(PYTHONINTERP_FOUND AND (CXXTEST_USE_PYTHON OR NOT PERL_FOUND OR NOT DEFINED CXXTEST_USE_PYTHON)) + if(PYTHON_FOUND AND (CXXTEST_USE_PYTHON OR NOT PERL_FOUND OR NOT DEFINED CXXTEST_USE_PYTHON)) set(CXXTEST_TESTGEN_EXECUTABLE ${CXXTEST_PYTHON_TESTGEN_EXECUTABLE}) execute_process(COMMAND ${CXXTEST_PYTHON_TESTGEN_EXECUTABLE} --version OUTPUT_VARIABLE _CXXTEST_OUT ERROR_VARIABLE _CXXTEST_OUT RESULT_VARIABLE _CXXTEST_RESULT) if(_CXXTEST_RESULT EQUAL 0) set(CXXTEST_TESTGEN_INTERPRETER "") else() - set(CXXTEST_TESTGEN_INTERPRETER ${PYTHON_EXECUTABLE}) + set(CXXTEST_TESTGEN_INTERPRETER ${Python_EXECUTABLE}) endif() FIND_PACKAGE_HANDLE_STANDARD_ARGS(CxxTest DEFAULT_MSG CXXTEST_INCLUDE_DIR CXXTEST_PYTHON_TESTGEN_EXECUTABLE) diff --git a/Tests/RunCMake/UseSWIG/BasicConfiguration.cmake b/Tests/RunCMake/UseSWIG/BasicConfiguration.cmake index 94d8dd3..2f46d63 100644 --- a/Tests/RunCMake/UseSWIG/BasicConfiguration.cmake +++ b/Tests/RunCMake/UseSWIG/BasicConfiguration.cmake @@ -9,10 +9,9 @@ unset(SWIG_LANG_OPTIONS) unset(SWIG_LANG_LIBRARIES) if(${language} MATCHES python) - find_package(PythonInterp REQUIRED) - find_package(PythonLibs REQUIRED) - set(SWIG_LANG_INCLUDE_DIRECTORIES ${PYTHON_INCLUDE_PATH}) - set(SWIG_LANG_LIBRARIES ${PYTHON_LIBRARIES}) + find_package(Python REQUIRED COMPONENTS Interpreter Development) + set(SWIG_LANG_INCLUDE_DIRECTORIES ${Python_INCLUDE_DIRS}) + set(SWIG_LANG_LIBRARIES ${Python_LIBRARIES}) endif() if(${language} MATCHES perl) find_package(Perl REQUIRED) diff --git a/Tests/RunCMake/UseSWIG/BasicPython.cmake b/Tests/RunCMake/UseSWIG/BasicPython.cmake index 0d8c824..873dbe9 100644 --- a/Tests/RunCMake/UseSWIG/BasicPython.cmake +++ b/Tests/RunCMake/UseSWIG/BasicPython.cmake @@ -5,5 +5,5 @@ include (BasicConfiguration.cmake) add_custom_target (RunTest COMMAND "${CMAKE_COMMAND}" -E env "PYTHONPATH=$<TARGET_FILE_DIR:example>" - "${PYTHON_EXECUTABLE}" "${CMAKE_CURRENT_SOURCE_DIR}/runme.py" + "${Python_EXECUTABLE}" "${CMAKE_CURRENT_SOURCE_DIR}/runme.py" DEPENDS example) diff --git a/Tests/Server/CMakeLists.txt b/Tests/Server/CMakeLists.txt index 41d1131..8321edb 100644 --- a/Tests/Server/CMakeLists.txt +++ b/Tests/Server/CMakeLists.txt @@ -1,10 +1,10 @@ cmake_minimum_required(VERSION 3.4) project(Server CXX) -find_package(PythonInterp REQUIRED) +find_package(Python REQUIRED) macro(do_test bsname file type) - execute_process(COMMAND ${PYTHON_EXECUTABLE} + execute_process(COMMAND ${Python_EXECUTABLE} -B # no .pyc files "${CMAKE_SOURCE_DIR}/${type}-test.py" "${CMAKE_COMMAND}" |