summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorMarc Chevrier <marc.chevrier@sap.com>2018-03-05 15:27:26 (GMT)
committerMarc Chevrier <marc.chevrier@sap.com>2018-03-20 08:29:55 (GMT)
commit50b5e9ed1316f82976a45c5fb2b00d0d3a3e4438 (patch)
treec09daa8de0a151b6e79c44608365de413b7bad25 /Tests
parent352baee2074d12637c65e3113f560bbf98d0640a (diff)
downloadCMake-50b5e9ed1316f82976a45c5fb2b00d0d3a3e4438.zip
CMake-50b5e9ed1316f82976a45c5fb2b00d0d3a3e4438.tar.gz
CMake-50b5e9ed1316f82976a45c5fb2b00d0d3a3e4438.tar.bz2
CMake build: Use new FindPython module
Diffstat (limited to 'Tests')
-rw-r--r--Tests/RunCMake/UseSWIG/BasicConfiguration.cmake7
-rw-r--r--Tests/RunCMake/UseSWIG/BasicPython.cmake2
-rw-r--r--Tests/Server/CMakeLists.txt4
3 files changed, 6 insertions, 7 deletions
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}"