summaryrefslogtreecommitdiffstats
path: root/Modules/Compiler/NVIDIA-CUDA.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/Compiler/NVIDIA-CUDA.cmake')
-rw-r--r--Modules/Compiler/NVIDIA-CUDA.cmake8
1 files changed, 8 insertions, 0 deletions
diff --git a/Modules/Compiler/NVIDIA-CUDA.cmake b/Modules/Compiler/NVIDIA-CUDA.cmake
index e24738d..94c2fc9 100644
--- a/Modules/Compiler/NVIDIA-CUDA.cmake
+++ b/Modules/Compiler/NVIDIA-CUDA.cmake
@@ -46,6 +46,14 @@ endif()
set(CMAKE_SHARED_LIBRARY_CREATE_CUDA_FLAGS -shared)
set(CMAKE_INCLUDE_SYSTEM_FLAG_CUDA -isystem=)
+if (CMAKE_CUDA_SIMULATE_ID STREQUAL "GNU")
+ set(CMAKE_CUDA_LINKER_WRAPPER_FLAG "-Wl,")
+ set(CMAKE_CUDA_LINKER_WRAPPER_FLAG_SEP ",")
+elseif(CMAKE_CUDA_SIMULATE_ID STREQUAL "Clang")
+ set(CMAKE_CUDA_LINKER_WRAPPER_FLAG "-Xlinker" " ")
+ set(CMAKE_CUDA_LINKER_WRAPPER_FLAG_SEP)
+endif()
+
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")