summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Modules/FindPython/Support.cmake13
-rw-r--r--Tests/FindPython/FindPythonScript.cmake2
2 files changed, 6 insertions, 9 deletions
diff --git a/Modules/FindPython/Support.cmake b/Modules/FindPython/Support.cmake
index 1be0625..9b65f39 100644
--- a/Modules/FindPython/Support.cmake
+++ b/Modules/FindPython/Support.cmake
@@ -5,17 +5,13 @@
# This file is a "template" file used by various FindPython modules.
#
-cmake_policy (GET CMP0094 _${_PYTHON_PREFIX}_LOOKUP_POLICY)
-
-cmake_policy (VERSION 3.7)
-
-if (_${_PYTHON_PREFIX}_LOOKUP_POLICY)
- cmake_policy (SET CMP0094 ${_${_PYTHON_PREFIX}_LOOKUP_POLICY})
-endif()
-
#
# Initial configuration
#
+
+# IN_LIST operator
+cmake_policy (SET CMP0057 NEW)
+
if (NOT DEFINED _PYTHON_PREFIX)
message (FATAL_ERROR "FindPython: INTERNAL ERROR")
endif()
@@ -1097,6 +1093,7 @@ endif()
unset (${_PYTHON_PREFIX}_SOABI)
# Define lookup strategy
+cmake_policy (GET CMP0094 _${_PYTHON_PREFIX}_LOOKUP_POLICY)
if (_${_PYTHON_PREFIX}_LOOKUP_POLICY STREQUAL "NEW")
set (_${_PYTHON_PREFIX}_FIND_STRATEGY "LOCATION")
else()
diff --git a/Tests/FindPython/FindPythonScript.cmake b/Tests/FindPython/FindPythonScript.cmake
index bc7e0d1..808496e 100644
--- a/Tests/FindPython/FindPythonScript.cmake
+++ b/Tests/FindPython/FindPythonScript.cmake
@@ -1,4 +1,4 @@
-
+cmake_minimum_required(VERSION 3.12)
if (PYTHON_MUST_NOT_BE_FOUND)
find_package(${PYTHON_PACKAGE_NAME} QUIET)
if (${PYTHON_PACKAGE_NAME}_FOUND)