diff options
author | Brad King <brad.king@kitware.com> | 2023-03-31 12:08:10 +0000 |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2023-03-31 08:08:18 -0400 |
commit | fb37de96a096d4b6813b62265a37aea25137b919 (patch) | |
tree | e2dad987f8e6568f1248d1d9dcec5868ba0d16bc /Help | |
parent | afaeee52a7d80789d4e452d7c831052fc0cbd170 (diff) | |
parent | a4c5b91f80003d007cddbb0de95032d65ec98ace (diff) | |
download | cmake-fb37de96a096d4b6813b62265a37aea25137b919.tar.gz |
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 '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 a37a45c8c5..158bf62155 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 0000000000..2f5c43d209 --- /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 0000000000..426febb50c --- /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`. |