mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-06 05:40:54 -06:00
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.
This commit is contained in:
@@ -2,7 +2,12 @@
|
||||
FindCUDA
|
||||
--------
|
||||
|
||||
.. warning:: *Deprecated since version 3.10.*
|
||||
.. versionchanged:: 3.27
|
||||
This module is available only if policy :policy:`CMP0146` is not set to ``NEW``.
|
||||
Port projects to CMake's first-class ``CUDA`` language support.
|
||||
|
||||
.. deprecated:: 3.10
|
||||
Do not use this module in new code.
|
||||
|
||||
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
|
||||
@@ -555,6 +560,16 @@ The script defines the following variables:
|
||||
#
|
||||
###############################################################################
|
||||
|
||||
cmake_policy(GET CMP0146 _FindCUDA_CMP0146)
|
||||
if(_FindCUDA_CMP0146 STREQUAL "NEW")
|
||||
message(FATAL_ERROR "The FindCUDA module has been removed by policy CMP0146.")
|
||||
endif()
|
||||
|
||||
if(_FindCUDA_testing)
|
||||
set(_FindCUDA_included TRUE)
|
||||
return()
|
||||
endif()
|
||||
|
||||
# FindCUDA.cmake
|
||||
|
||||
# This macro helps us find the location of helper files we will need the full path to
|
||||
|
||||
Reference in New Issue
Block a user