summaryrefslogtreecommitdiffstats
path: root/Modules/Compiler/NVIDIA-CUDA.cmake
diff options
context:
space:
mode:
authorRobert Maynard <robert.maynard@kitware.com>2016-09-19 17:14:47 (GMT)
committerRobert Maynard <robert.maynard@kitware.com>2016-11-14 16:36:44 (GMT)
commit489c52ce680df6439f9c1e553cd2925ca8944cb1 (patch)
tree4f1bba3a3e3ef47c9e7456d4b3c4098d57fc6fa1 /Modules/Compiler/NVIDIA-CUDA.cmake
parentbbaf24341026cdacd1e313dd3f8e3501e9c4070e (diff)
downloadCMake-489c52ce680df6439f9c1e553cd2925ca8944cb1.zip
CMake-489c52ce680df6439f9c1e553cd2925ca8944cb1.tar.gz
CMake-489c52ce680df6439f9c1e553cd2925ca8944cb1.tar.bz2
CUDA: Use the host compiler for linking CUDA executables and shared libs.
Diffstat (limited to 'Modules/Compiler/NVIDIA-CUDA.cmake')
-rw-r--r--Modules/Compiler/NVIDIA-CUDA.cmake6
1 files changed, 4 insertions, 2 deletions
diff --git a/Modules/Compiler/NVIDIA-CUDA.cmake b/Modules/Compiler/NVIDIA-CUDA.cmake
index 6f12ff2..6b1ac74 100644
--- a/Modules/Compiler/NVIDIA-CUDA.cmake
+++ b/Modules/Compiler/NVIDIA-CUDA.cmake
@@ -1,9 +1,11 @@
-set(CMAKE_CUDA_VERBOSE_FLAG "-v -Xcompiler=-v")
+set(CMAKE_CUDA_VERBOSE_FLAG "-v")
set(CMAKE_CUDA_COMPILE_OPTIONS_PIE -Xcompiler=-fPIE)
set(CMAKE_CUDA_COMPILE_OPTIONS_PIC -Xcompiler=-fPIC)
-set(CMAKE_SHARED_LIBRARY_CUDA_FLAGS -Xcompiler=-fPIC)
+#CMAKE_SHARED_LIBRARY_CUDA_FLAGS is sent to the host linker so we don' need
+#to forward it through nvcc
+set(CMAKE_SHARED_LIBRARY_CUDA_FLAGS -fPIC)
set(CMAKE_SHARED_LIBRARY_CREATE_CUDA_FLAGS -shared)
set(CMAKE_INCLUDE_SYSTEM_FLAG_CUDA -isystem=)
set(CMAKE_CUDA_COMPILE_OPTIONS_VISIBILITY -Xcompiler=-fvisibility=)