summaryrefslogtreecommitdiffstats
path: root/Modules/Platform
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/Platform
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/Platform')
-rw-r--r--Modules/Platform/Windows-NVIDIA-CUDA.cmake1
1 files changed, 0 insertions, 1 deletions
diff --git a/Modules/Platform/Windows-NVIDIA-CUDA.cmake b/Modules/Platform/Windows-NVIDIA-CUDA.cmake
index f809094..98cd5ef 100644
--- a/Modules/Platform/Windows-NVIDIA-CUDA.cmake
+++ b/Modules/Platform/Windows-NVIDIA-CUDA.cmake
@@ -69,7 +69,6 @@ else()
endif()
unset(_cmp0092)
-set(CMAKE_CUDA_RUNTIME_LIBRARY_DEFAULT "STATIC")
set(CMAKE_CUDA_RUNTIME_LIBRARY_LINK_OPTIONS_STATIC "cudadevrt;cudart_static")
set(CMAKE_CUDA_RUNTIME_LIBRARY_LINK_OPTIONS_SHARED "cudadevrt;cudart")
set(CMAKE_CUDA_RUNTIME_LIBRARY_LINK_OPTIONS_NONE "")