summaryrefslogtreecommitdiff
path: root/Help
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-03-10 16:02:00 +0000
committerKitware Robot <kwrobot@kitware.com>2023-03-10 11:02:07 -0500
commit9cf38e7b14daf96d6f2bda4b6a910b4de17d5f3d (patch)
tree33e7201bcb7f577cd0c265a9610877a7edb9e3ce /Help
parentecf7348cefca9b1f42c5e198dc4d3e148132fdc8 (diff)
parent2c146a7fc5499669ea0aa8bf37fd4ef5c1c517e4 (diff)
downloadcmake-9cf38e7b14daf96d6f2bda4b6a910b4de17d5f3d.tar.gz
Merge topic 'FindCUDA-remove'
2c146a7fc5 FindCUDA: Add policy to remove this module Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !8306
Diffstat (limited to 'Help')
-rw-r--r--Help/manual/cmake-policies.7.rst1
-rw-r--r--Help/policy/CMP0146.rst29
-rw-r--r--Help/release/dev/FindCUDA-remove.rst6
3 files changed, 36 insertions, 0 deletions
diff --git a/Help/manual/cmake-policies.7.rst b/Help/manual/cmake-policies.7.rst
index 28272ad883..811547baa1 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
+ CMP0146: The FindCUDA module is removed. </policy/CMP0146>
CMP0145: The Dart and FindDart modules are removed. </policy/CMP0145>
CMP0144: find_package uses upper-case PACKAGENAME_ROOT variables. </policy/CMP0144>
diff --git a/Help/policy/CMP0146.rst b/Help/policy/CMP0146.rst
new file mode 100644
index 0000000000..c7cac22044
--- /dev/null
+++ b/Help/policy/CMP0146.rst
@@ -0,0 +1,29 @@
+CMP0146
+-------
+
+.. versionadded:: 3.27
+
+The :module:`FindCUDA` module is removed.
+
+The :module:`FindCUDA` module has been deprecated since CMake 3.10.
+CMake 3.27 and above prefer to not provide the module.
+This policy provides compatibility for projects that have not been
+ported away from it.
+
+Projects using the :module:`FindCUDA` module should be updated to use
+CMake's first-class ``CUDA`` language support. List ``CUDA`` among the
+languages named in the top-level call to the :command:`project` command,
+or call the :command:`enable_language` command with ``CUDA``.
+Then one can add CUDA (``.cu``) sources directly to targets,
+similar to other languages.
+
+The ``OLD`` behavior of this policy is for ``find_package(CUDA)`` to
+load the deprecated module. The ``NEW`` behavior is for uses of the
+module to fail as if it does 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/FindCUDA-remove.rst b/Help/release/dev/FindCUDA-remove.rst
new file mode 100644
index 0000000000..e8b09d4759
--- /dev/null
+++ b/Help/release/dev/FindCUDA-remove.rst
@@ -0,0 +1,6 @@
+FindCUDA-remove
+---------------
+
+* The :module:`FindCUDA` module has been fully deprecated via policy
+ :policy:`CMP0146`. Port projects to CMake's first-class ``CUDA``
+ language support.