diff options
author | Brad King <brad.king@kitware.com> | 2023-03-30 14:13:07 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2023-03-30 16:05:09 (GMT) |
commit | a4c5b91f80003d007cddbb0de95032d65ec98ace (patch) | |
tree | 591d68a94107253b48f6398a3188e1c89169e0c8 /Help | |
parent | 4901fdb201bc6264e976e105780a490d9c0eba19 (diff) | |
download | CMake-a4c5b91f80003d007cddbb0de95032d65ec98ace.zip CMake-a4c5b91f80003d007cddbb0de95032d65ec98ace.tar.gz CMake-a4c5b91f80003d007cddbb0de95032d65ec98ace.tar.bz2 |
FindPython{Interp,Libs}: Add policy to remove these modules
The `FindPythonInterp` and `FindPythonLibs` modules have been deprecated
since CMake 3.12. Add a policy to pretend they do not exist in order to
encourage projects to port to `FindPython` or `FindPython{2,3}`.
Diffstat (limited to 'Help')
-rw-r--r-- | Help/manual/cmake-policies.7.rst | 1 | ||||
-rw-r--r-- | Help/policy/CMP0148.rst | 29 | ||||
-rw-r--r-- | Help/release/dev/remove-FindPythonInterp-FindPythonLibs.rst | 6 |
3 files changed, 36 insertions, 0 deletions
diff --git a/Help/manual/cmake-policies.7.rst b/Help/manual/cmake-policies.7.rst index a37a45c..158bf62 100644 --- a/Help/manual/cmake-policies.7.rst +++ b/Help/manual/cmake-policies.7.rst @@ -57,6 +57,7 @@ Policies Introduced by CMake 3.27 .. toctree:: :maxdepth: 1 + CMP0148: The FindPythonInterp and FindPythonLibs modules are removed. </policy/CMP0148> CMP0147: Visual Studio generators build custom commands in parallel. </policy/CMP0147> CMP0146: The FindCUDA module is removed. </policy/CMP0146> CMP0145: The Dart and FindDart modules are removed. </policy/CMP0145> diff --git a/Help/policy/CMP0148.rst b/Help/policy/CMP0148.rst new file mode 100644 index 0000000..2f5c43d --- /dev/null +++ b/Help/policy/CMP0148.rst @@ -0,0 +1,29 @@ +CMP0148 +------- + +.. versionadded:: 3.27 + +The :module:`FindPythonInterp` and :module:`FindPythonLibs` modules are removed. + +These modules have been deprecated since CMake 3.12. +CMake 3.27 and above prefer to not provide the modules. +This policy provides compatibility for projects that have not been +ported away from them. + +Projects using the :module:`FindPythonInterp` and/or :module:`FindPythonLibs` +modules should be updated to use one of their replacements: + +* :module:`FindPython3` +* :module:`FindPython2` +* :module:`FindPython` + +The ``OLD`` behavior of this policy is for ``find_package(PythonInterp)`` +and ``find_package(PythonLibs)`` to load the deprecated modules. The ``NEW`` +behavior is for uses of the modules to fail as if they do not exist. + +This policy was introduced in CMake version 3.27. CMake version +|release| warns when the policy is not set and uses ``OLD`` behavior. +Use the :command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` +explicitly. + +.. include:: DEPRECATED.txt diff --git a/Help/release/dev/remove-FindPythonInterp-FindPythonLibs.rst b/Help/release/dev/remove-FindPythonInterp-FindPythonLibs.rst new file mode 100644 index 0000000..426febb --- /dev/null +++ b/Help/release/dev/remove-FindPythonInterp-FindPythonLibs.rst @@ -0,0 +1,6 @@ +remove-FindPythonInterp-FindPythonLibs +-------------------------------------- + +* The :module:`FindPythonInterp` and :module:`FindPythonLibs` modules have + been fully deprecated via policy :policy:`CMP0148`. Port projects to + :module:`FindPython3`, :module:`FindPython2`, or :module:`FindPython`. |