mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-05 13:20:47 -06:00
Since commit 0d0145138f (CUDA: Add abstraction for cuda runtime
selection, 2019-11-29, v3.17.0-rc1~83^2) we add CUDA runtime library
selection flags by default.
To maintain backwards compatibility the default CUDA runtime
library needs to be computed based on what libraries are found
on the initial compiler invocation. For example a toolchain
could establish initial flags that have all CUDA compilations
using the runtime version, and if we don't detect this we will
try to link to both the static and shared runtime.
Co-Author: Brad King <brad.king@kitware.com>
Fixes: #20708
26 lines
960 B
ReStructuredText
26 lines
960 B
ReStructuredText
CMAKE_CUDA_RUNTIME_LIBRARY
|
|
--------------------------
|
|
|
|
Select the CUDA runtime library for use when compiling and linking CUDA.
|
|
This variable is used to initialize the :prop_tgt:`CUDA_RUNTIME_LIBRARY`
|
|
property on all targets as they are created.
|
|
|
|
The allowed case insensitive values are:
|
|
|
|
.. include:: ../prop_tgt/CUDA_RUNTIME_LIBRARY-VALUES.txt
|
|
|
|
Contents of ``CMAKE_CUDA_RUNTIME_LIBRARY`` may use
|
|
:manual:`generator expressions <cmake-generator-expressions(7)>`.
|
|
|
|
If this variable is not set then the :prop_tgt:`CUDA_RUNTIME_LIBRARY` target
|
|
property will not be set automatically. If that property is not set then
|
|
CMake uses an appropriate default value based on the compiler to select the
|
|
CUDA runtime library.
|
|
|
|
.. note::
|
|
|
|
This property has effect only when the ``CUDA`` language is enabled. To
|
|
control the CUDA runtime linking when only using the CUDA SDK with the
|
|
``C`` or ``C++`` language we recommend using the :module:`FindCUDAToolkit`
|
|
module.
|