blob: ca2c57151726d0804409925dadb0cca6789c575f [file] [log] [blame]
CMP0104
-------
Initialize :variable:`CMAKE_CUDA_ARCHITECTURES` when
:variable:`CMAKE_CUDA_COMPILER_ID <CMAKE_<LANG>_COMPILER_ID>` is ``NVIDIA``.
Raise an error if :prop_tgt:`CUDA_ARCHITECTURES` is empty.
:variable:`CMAKE_CUDA_ARCHITECTURES` introduced in CMake 3.18 is used to
initialize :prop_tgt:`CUDA_ARCHITECTURES`, which passes correct code generation
flags to the CUDA compiler.
Previous to this users had to manually specify the code generation flags. This
policy is for backwards compatibility with manually specifying code generation
flags.
The ``OLD`` behavior for this policy is to not initialize
:variable:`CMAKE_CUDA_ARCHITECTURES` when
:variable:`CMAKE_CUDA_COMPILER_ID <CMAKE_<LANG>_COMPILER_ID>` is ``NVIDIA``.
Empty :prop_tgt:`CUDA_ARCHITECTURES` is allowed.
The ``NEW`` behavior of this policy is to initialize
:variable:`CMAKE_CUDA_ARCHITECTURES` when
:variable:`CMAKE_CUDA_COMPILER_ID <CMAKE_<LANG>_COMPILER_ID>` is ``NVIDIA``
and raise an error if :prop_tgt:`CUDA_ARCHITECTURES` is empty during generation.
This policy was introduced in CMake version 3.18. 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