summaryrefslogtreecommitdiffstats
path: root/Modules/FindPythonLibs.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-03-31 12:08:10 (GMT)
committerKitware Robot <kwrobot@kitware.com>2023-03-31 12:08:18 (GMT)
commitfb37de96a096d4b6813b62265a37aea25137b919 (patch)
treee2dad987f8e6568f1248d1d9dcec5868ba0d16bc /Modules/FindPythonLibs.cmake
parentafaeee52a7d80789d4e452d7c831052fc0cbd170 (diff)
parenta4c5b91f80003d007cddbb0de95032d65ec98ace (diff)
downloadCMake-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/FindPythonLibs.cmake')
-rw-r--r--Modules/FindPythonLibs.cmake13
1 files changed, 13 insertions, 0 deletions
diff --git a/Modules/FindPythonLibs.cmake b/Modules/FindPythonLibs.cmake
index 43a84dd..06004ee 100644
--- a/Modules/FindPythonLibs.cmake
+++ b/Modules/FindPythonLibs.cmake
@@ -5,6 +5,9 @@
FindPythonLibs
--------------
+.. 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.
@@ -45,6 +48,16 @@ get the currently active Python version by default with a consistent version
of PYTHON_LIBRARIES.
#]=======================================================================]
+cmake_policy(GET CMP0148 _FindPythonLibs_CMP0148)
+if(_FindPythonLibs_CMP0148 STREQUAL "NEW")
+ message(FATAL_ERROR "The FindPythonLibs module has been removed by policy CMP0148.")
+endif()
+
+if(_FindPythonLibs_testing)
+ set(_FindPythonLibs_included TRUE)
+ return()
+endif()
+
# Use the executable's path as a hint
set(_Python_LIBRARY_PATH_HINT)
if(IS_ABSOLUTE "${PYTHON_EXECUTABLE}")