diff options
author | Marc Chevrier <marc.chevrier@gmail.com> | 2020-04-06 09:22:37 (GMT) |
---|---|---|
committer | Marc Chevrier <marc.chevrier@gmail.com> | 2020-04-19 13:53:11 (GMT) |
commit | 4248bb452a5886ec4b632e2d602fcaafd2b13aaf (patch) | |
tree | b7e126570036c7a7ec0ac61ca7ef99f67edd6d18 /Modules/Compiler | |
parent | ec48e023f6261371aa5d0e46ebf9c163e40c9b40 (diff) | |
download | CMake-4248bb452a5886ec4b632e2d602fcaafd2b13aaf.zip CMake-4248bb452a5886ec4b632e2d602fcaafd2b13aaf.tar.gz CMake-4248bb452a5886ec4b632e2d602fcaafd2b13aaf.tar.bz2 |
CUDA: Device linking use now link options
properties LINK_OPTIONS and INTERFACE_LINK_OPTIONS are propagated
to the device link step.
To control which options are selected for normal link and device link steps,
the $<DEVICE_LINK> and $<HOST_LINK> generator expressions can be used.
Fixes: #18265
Diffstat (limited to 'Modules/Compiler')
-rw-r--r-- | Modules/Compiler/NVIDIA-CUDA.cmake | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Modules/Compiler/NVIDIA-CUDA.cmake b/Modules/Compiler/NVIDIA-CUDA.cmake index 94c2fc9..4b09e6f 100644 --- a/Modules/Compiler/NVIDIA-CUDA.cmake +++ b/Modules/Compiler/NVIDIA-CUDA.cmake @@ -54,6 +54,11 @@ elseif(CMAKE_CUDA_SIMULATE_ID STREQUAL "Clang") set(CMAKE_CUDA_LINKER_WRAPPER_FLAG_SEP) endif() +set(CMAKE_CUDA_DEVICE_COMPILER_WRAPPER_FLAG "-Xcompiler=") +set(CMAKE_CUDA_DEVICE_COMPILER_WRAPPER_FLAG_SEP ",") +set(CMAKE_CUDA_DEVICE_LINKER_WRAPPER_FLAG "-Xlinker=") +set(CMAKE_CUDA_DEVICE_LINKER_WRAPPER_FLAG_SEP ",") + 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") |