summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeCUDACompiler.cmake.in
diff options
context:
space:
mode:
authorRobert Maynard <robert.maynard@kitware.com>2020-05-18 19:29:18 (GMT)
committerBrad King <brad.king@kitware.com>2020-05-21 15:15:03 (GMT)
commite55b21e24ee81f5433b8ec778aa341c485d6e149 (patch)
treed10f18e2def364aa034b8b59238b535c635673fc /Modules/CMakeCUDACompiler.cmake.in
parent1086e930dc8ad94847f17f627673db8f7a3fb3ab (diff)
downloadCMake-e55b21e24ee81f5433b8ec778aa341c485d6e149.zip
CMake-e55b21e24ee81f5433b8ec778aa341c485d6e149.tar.gz
CMake-e55b21e24ee81f5433b8ec778aa341c485d6e149.tar.bz2
CUDA: Compute CMAKE_CUDA_RUNTIME_LIBRARY default from toolchain
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
Diffstat (limited to 'Modules/CMakeCUDACompiler.cmake.in')
-rw-r--r--Modules/CMakeCUDACompiler.cmake.in2
1 files changed, 2 insertions, 0 deletions
diff --git a/Modules/CMakeCUDACompiler.cmake.in b/Modules/CMakeCUDACompiler.cmake.in
index 4a615a3..04a4c42 100644
--- a/Modules/CMakeCUDACompiler.cmake.in
+++ b/Modules/CMakeCUDACompiler.cmake.in
@@ -53,5 +53,7 @@ set(CMAKE_CUDA_IMPLICIT_LINK_LIBRARIES "@CMAKE_CUDA_IMPLICIT_LINK_LIBRARIES@")
set(CMAKE_CUDA_IMPLICIT_LINK_DIRECTORIES "@CMAKE_CUDA_IMPLICIT_LINK_DIRECTORIES@")
set(CMAKE_CUDA_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "@CMAKE_CUDA_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES@")
+@_SET_CMAKE_CUDA_RUNTIME_LIBRARY_DEFAULT@
+
set(CMAKE_LINKER "@CMAKE_LINKER@")
set(CMAKE_MT "@CMAKE_MT@")