From 67680bc4ec0a367043ea2a8604f37b640f6c51d6 Mon Sep 17 00:00:00 2001 From: GarrettDMorrison Date: Tue, 12 Dec 2023 09:46:05 -0800 Subject: [PATCH] add policy guard --- python/CMakeLists.txt | 4 ++++ tests/python/CMakeLists.txt | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index f2c1041b9..25550572f 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -1,3 +1,7 @@ +if (CMAKE_VERSION VERSION_GREATER 3.27.0) + cmake_policy(SET CMP0148 OLD) +endif () + set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_LIST_DIR}/scikit-build-cmake) include(UseCython) include(FindPythonExtensions) diff --git a/tests/python/CMakeLists.txt b/tests/python/CMakeLists.txt index a6b51eca0..34fa44644 100644 --- a/tests/python/CMakeLists.txt +++ b/tests/python/CMakeLists.txt @@ -1,3 +1,7 @@ +if (CMAKE_VERSION VERSION_GREATER 3.27.0) + cmake_policy(SET CMP0148 OLD) +endif () + set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/python/scikit-build-cmake) find_package(PythonInterp REQUIRED)