From 23753be1cc2c3c363a9bc93182b53cb36cda129d Mon Sep 17 00:00:00 2001 From: Raul Tambre Date: Wed, 24 Feb 2021 15:21:54 +0200 Subject: 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 --- Modules/Compiler/Clang-CUDA.cmake | 4 ++-- 1 file 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__COMPILER. Override the default. -set(CMAKE_CUDA_LINK_EXECUTABLE " -o ") -set(CMAKE_CUDA_CREATE_SHARED_LIBRARY " -o ") +set(CMAKE_CUDA_LINK_EXECUTABLE " -o ${__IMPLICIT_LINKS}") +set(CMAKE_CUDA_CREATE_SHARED_LIBRARY " -o ${__IMPLICIT_LINKS}") set(CMAKE_CUDA_RUNTIME_LIBRARY_DEFAULT "STATIC") set(CMAKE_CUDA_RUNTIME_LIBRARY_LINK_OPTIONS_STATIC "cudadevrt;cudart_static") -- cgit v0.12