diff options
author | Brad King <brad.king@kitware.com> | 2020-08-10 15:18:58 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2020-08-10 15:19:17 (GMT) |
commit | b88fb7eec61653f902762f50a68ce1e350cf4a49 (patch) | |
tree | 2d98e37e243eddc062ba637db4000f2ed8e882b7 /Modules | |
parent | 72409ee089ee1c969bb11d36da9543a58b354321 (diff) | |
parent | a92d3845489c2f420ab2ad461404157d2da3a73d (diff) | |
download | CMake-b88fb7eec61653f902762f50a68ce1e350cf4a49.zip CMake-b88fb7eec61653f902762f50a68ce1e350cf4a49.tar.gz CMake-b88fb7eec61653f902762f50a68ce1e350cf4a49.tar.bz2 |
Merge topic 'FindPython-user-policies' into release-3.18
a92d384548 FindPython: ensure user's policies are respected
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Henry Schreiner <henryschreineriii@gmail.com>
Merge-request: !5098
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/FindPython/Support.cmake | 13 |
1 files changed, 5 insertions, 8 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() |