Skip to content

CUDA: Compute CMAKE_CUDA_RUNTIME_LIBRARY default from toolchain

Since !4178 (merged) 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.

Fixes: #20708 (closed)
Backport: release:HEAD^2
Topic-rename: cuda-default-runtime

Edited by Brad King

Merge request reports