diff options
author | Marc Chevrier <marc.chevrier@gmail.com> | 2020-08-04 14:40:50 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2020-08-07 13:24:18 (GMT) |
commit | a92d3845489c2f420ab2ad461404157d2da3a73d (patch) | |
tree | 8dc345763d1c31ad23c945cf385b7ccf04e5aab5 /Tests/FindPython | |
parent | 63a65baf4c343c73b2142078ef0045d3711dea1d (diff) | |
download | CMake-a92d3845489c2f420ab2ad461404157d2da3a73d.zip CMake-a92d3845489c2f420ab2ad461404157d2da3a73d.tar.gz CMake-a92d3845489c2f420ab2ad461404157d2da3a73d.tar.bz2 |
FindPython: ensure user's policies are respected
Do not set the policy version before recording our internal macros such
as `__Python_add_library`. Otherwise callers get our policy version
instead of theirs. Instead just set the specific policies we need.
Also fix one case in our test suite where we were accidentally
relying on the policy version to be set by `FindPython`.
Fixes: #21042
Diffstat (limited to 'Tests/FindPython')
-rw-r--r-- | Tests/FindPython/FindPythonScript.cmake | 2 |
1 files changed, 1 insertions, 1 deletions
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) |