summaryrefslogtreecommitdiff
path: root/Help/policy
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-03-09 07:39:36 -0500
committerBrad King <brad.king@kitware.com>2023-03-09 07:39:36 -0500
commit2c146a7fc5499669ea0aa8bf37fd4ef5c1c517e4 (patch)
tree516117e03933617ceee62b364631130cb6ca8d03 /Help/policy
parentb6ffbffaf26006a361c1330d0edce9a6314f58bb (diff)
downloadcmake-2c146a7fc5499669ea0aa8bf37fd4ef5c1c517e4.tar.gz
FindCUDA: Add policy to remove this module
The `FindCUDA` module has been deprecated since CMake 3.10. Add a policy to pretend it doesn't exist in order to encourage projects to port away from it.
Diffstat (limited to 'Help/policy')
-rw-r--r--Help/policy/CMP0146.rst29
1 files changed, 29 insertions, 0 deletions
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