summaryrefslogtreecommitdiffstats
path: root/Modules/Compiler/Clang-CUDA.cmake
diff options
context:
space:
mode:
authorRaul Tambre <raul@tambre.ee>2021-02-24 13:21:54 (GMT)
committerBrad King <brad.king@kitware.com>2021-02-24 14:58:06 (GMT)
commit23753be1cc2c3c363a9bc93182b53cb36cda129d (patch)
tree45fdf0aa674bc138114c660b8b60cc56310dcc8d /Modules/Compiler/Clang-CUDA.cmake
parentca4a615118cfea8d977942012d0c0ae3566c4b80 (diff)
downloadCMake-23753be1cc2c3c363a9bc93182b53cb36cda129d.zip
CMake-23753be1cc2c3c363a9bc93182b53cb36cda129d.tar.gz
CMake-23753be1cc2c3c363a9bc93182b53cb36cda129d.tar.bz2
Clang/CUDA: Restore needed references to implicit link variables
In commit 4620cf77f2 (Clang: Remove unused CUDA implicit link variables, 2021-02-14) we removed some references. It turns out they are non-empty and necessary if using a non-scattered installation. Fixes: #21863
Diffstat (limited to 'Modules/Compiler/Clang-CUDA.cmake')
-rw-r--r--Modules/Compiler/Clang-CUDA.cmake4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/Compiler/Clang-CUDA.cmake b/Modules/Compiler/Clang-CUDA.cmake
index 37e5e9f..0223081 100644
--- a/Modules/Compiler/Clang-CUDA.cmake
+++ b/Modules/Compiler/Clang-CUDA.cmake
@@ -22,8 +22,8 @@ set(_CMAKE_CUDA_PTX_FLAG "--cuda-device-only -S")
set(_CMAKE_CUDA_DEVICE_CODE "-fgpu-rdc -c")
# RulePlaceholderExpander expands crosscompile variables like sysroot and target only for CMAKE_<LANG>_COMPILER. Override the default.
-set(CMAKE_CUDA_LINK_EXECUTABLE "<CMAKE_CUDA_COMPILER> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")
-set(CMAKE_CUDA_CREATE_SHARED_LIBRARY "<CMAKE_CUDA_COMPILER> <CMAKE_SHARED_LIBRARY_CUDA_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_CUDA_FLAGS> <SONAME_FLAG><TARGET_SONAME> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
+set(CMAKE_CUDA_LINK_EXECUTABLE "<CMAKE_CUDA_COMPILER> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>${__IMPLICIT_LINKS}")
+set(CMAKE_CUDA_CREATE_SHARED_LIBRARY "<CMAKE_CUDA_COMPILER> <CMAKE_SHARED_LIBRARY_CUDA_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_CUDA_FLAGS> <SONAME_FLAG><TARGET_SONAME> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>${__IMPLICIT_LINKS}")
set(CMAKE_CUDA_RUNTIME_LIBRARY_DEFAULT "STATIC")
set(CMAKE_CUDA_RUNTIME_LIBRARY_LINK_OPTIONS_STATIC "cudadevrt;cudart_static")