From e16b06f4b913c222aeb09c7465e372ca5e46bf83 Mon Sep 17 00:00:00 2001 From: Raul Tambre Date: Sat, 22 May 2021 11:14:03 +0300 Subject: FindCUDA: Make the deprecation notice more prominent FindCUDA is still widely used, but has been superseded by the much more robust native language support. However the deprecation hasn't been noticed well enough and real-world experience shows there's still new code written to use it. Change this particular notice to a warning to get a hard to miss red box. We lose the semantic meaning, but we don't want to make all notices like this. If there are similar cases in the future requiring it would be worth adding a custom variant of the deprecated directive. Fixes #22203. --- Modules/FindCUDA.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/FindCUDA.cmake b/Modules/FindCUDA.cmake index 16d7571..57482f1 100644 --- a/Modules/FindCUDA.cmake +++ b/Modules/FindCUDA.cmake @@ -2,7 +2,7 @@ FindCUDA -------- -.. deprecated:: 3.10 +.. warning:: *Deprecated since version 3.10.* It is no longer necessary to use this module or call ``find_package(CUDA)`` for compiling CUDA code. Instead, list ``CUDA`` among the languages named -- cgit v0.12 From 15fda9384a99035b2e77cce608a6b6e296a952c9 Mon Sep 17 00:00:00 2001 From: Raul Tambre Date: Sat, 22 May 2021 11:30:31 +0300 Subject: FindCUDA: Improve deprecation guidance wording Simplified the text regarding adding sources to be more general as there's also target_sources(). Improved the wording for FindCUDAToolkit to be more explicit of its usecase and avoid using "superseded" since the common usecase of FindCUDA was superseded by the language support. Wording suggestions incopropated from discussion on #22203. --- Modules/FindCUDA.cmake | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Modules/FindCUDA.cmake b/Modules/FindCUDA.cmake index 57482f1..dd795f4 100644 --- a/Modules/FindCUDA.cmake +++ b/Modules/FindCUDA.cmake @@ -8,13 +8,13 @@ It is no longer necessary to use this module or call ``find_package(CUDA)`` for compiling CUDA code. Instead, 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 to programs directly -in calls to :command:`add_library` and :command:`add_executable`. +Then one can add CUDA (``.cu``) sources directly to targets similar to other +languages. .. versionadded:: 3.17 - To find and use the CUDA toolkit libraries the :module:`FindCUDAToolkit` - module has superseded this module. It works whether or not the ``CUDA`` - language is enabled. + To find and use the CUDA toolkit libraries manually, use the + :module:`FindCUDAToolkit` module instead. It works regardless of the + ``CUDA`` language being enabled. Documentation of Deprecated Usage ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -- cgit v0.12