diff options
| author | Brad King <brad.king@kitware.com> | 2023-03-31 12:08:10 (GMT) |
|---|---|---|
| committer | Kitware Robot <kwrobot@kitware.com> | 2023-03-31 12:08:18 (GMT) |
| commit | fb37de96a096d4b6813b62265a37aea25137b919 (patch) | |
| tree | e2dad987f8e6568f1248d1d9dcec5868ba0d16bc /Modules/FindPythonInterp.cmake | |
| parent | afaeee52a7d80789d4e452d7c831052fc0cbd170 (diff) | |
| parent | a4c5b91f80003d007cddbb0de95032d65ec98ace (diff) | |
| download | CMake-fb37de96a096d4b6813b62265a37aea25137b919.zip CMake-fb37de96a096d4b6813b62265a37aea25137b919.tar.gz CMake-fb37de96a096d4b6813b62265a37aea25137b919.tar.bz2 | |
Merge topic 'remove-FindPythonInterp-FindPythonLibs'
a4c5b91f80 FindPython{Interp,Libs}: Add policy to remove these modules
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: scivision <michael@scivision.dev>
Merge-request: !8380
Diffstat (limited to 'Modules/FindPythonInterp.cmake')
| -rw-r--r-- | Modules/FindPythonInterp.cmake | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Modules/FindPythonInterp.cmake b/Modules/FindPythonInterp.cmake index 7ad3587..b5e759d 100644 --- a/Modules/FindPythonInterp.cmake +++ b/Modules/FindPythonInterp.cmake @@ -5,6 +5,9 @@ FindPythonInterp ---------------- +.. versionchanged:: 3.27 + This module is available only if policy :policy:`CMP0148` is not set to ``NEW``. + .. deprecated:: 3.12 Use :module:`FindPython3`, :module:`FindPython2` or :module:`FindPython` instead. @@ -50,6 +53,16 @@ of PYTHON_LIBRARIES. #]=======================================================================] +cmake_policy(GET CMP0148 _FindPythonInterp_CMP0148) +if(_FindPythonInterp_CMP0148 STREQUAL "NEW") + message(FATAL_ERROR "The FindPythonInterp module has been removed by policy CMP0148.") +endif() + +if(_FindPythonInterp_testing) + set(_FindPythonInterp_included TRUE) + return() +endif() + unset(_Python_NAMES) set(_PYTHON1_VERSIONS 1.6 1.5) |
