diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index f2c1041b9..95a5c64e1 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -1,3 +1,5 @@ +cmake_policy(SET CMP0148 OLD) + set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_LIST_DIR}/scikit-build-cmake) include(UseCython) include(FindPythonExtensions) diff --git a/python/scikit-build-cmake/FindCython.cmake b/python/scikit-build-cmake/FindCython.cmake index 73534e9c9..8ab019db7 100644 --- a/python/scikit-build-cmake/FindCython.cmake +++ b/python/scikit-build-cmake/FindCython.cmake @@ -37,6 +37,8 @@ # Use the Cython executable that lives next to the Python executable # if it is a local installation. +cmake_policy(SET CMP0148 OLD) + find_package(PythonInterp) if(PYTHONINTERP_FOUND) execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "from os import path; import cython; print(path.dirname(cython.__file__))" diff --git a/python/scikit-build-cmake/FindNumPy.cmake b/python/scikit-build-cmake/FindNumPy.cmake index cd78112b5..b1b770378 100644 --- a/python/scikit-build-cmake/FindNumPy.cmake +++ b/python/scikit-build-cmake/FindNumPy.cmake @@ -32,6 +32,8 @@ # set(NumPy_FROM_TEMPLATE_EXECUTABLE /path/to/python /path/to/site-packages/numpy/distutils/from_template.py CACHE STRING "Command executing from-template program" FORCE) # +cmake_policy(SET CMP0148 OLD) + if(NOT NumPy_FOUND) set(_find_extra_args) if(NumPy_FIND_REQUIRED) diff --git a/python/scikit-build-cmake/FindPythonExtensions.cmake b/python/scikit-build-cmake/FindPythonExtensions.cmake index 33e034d09..ffa205e76 100644 --- a/python/scikit-build-cmake/FindPythonExtensions.cmake +++ b/python/scikit-build-cmake/FindPythonExtensions.cmake @@ -244,6 +244,8 @@ # limitations under the License. #============================================================================= +cmake_policy(SET CMP0148 OLD) + find_package(PythonInterp REQUIRED) find_package(PythonLibs) include(targetLinkLibrariesWithDynamicLookup) diff --git a/python/scikit-build-cmake/UseCython.cmake b/python/scikit-build-cmake/UseCython.cmake index 2c40bd7b5..48a288f61 100644 --- a/python/scikit-build-cmake/UseCython.cmake +++ b/python/scikit-build-cmake/UseCython.cmake @@ -94,6 +94,8 @@ # limitations under the License. #============================================================================= +cmake_policy(SET CMP0148 OLD) + # Configuration options. set(CYTHON_ANNOTATE OFF CACHE BOOL "Create an annotated .html file when compiling *.pyx.") diff --git a/tests/python/CMakeLists.txt b/tests/python/CMakeLists.txt index a6b51eca0..815d6a987 100644 --- a/tests/python/CMakeLists.txt +++ b/tests/python/CMakeLists.txt @@ -1,3 +1,4 @@ +cmake_policy(SET CMP0148 OLD) set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/python/scikit-build-cmake) find_package(PythonInterp REQUIRED)