summaryrefslogtreecommitdiffstats
path: root/Modules/Platform
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-06-13 13:17:06 (GMT)
committerBrad King <brad.king@kitware.com>2017-06-13 13:17:06 (GMT)
commitfb99b0b87b616e2045e2112ec99bb9f0ff08b128 (patch)
treed2988251c5cbe218bf1ef9576a64e754084d7b47 /Modules/Platform
parent70ec0f2ad1d4acf6c7c9ab49c756985d468a1a69 (diff)
parent7368ade2502a347b18c47fc175b67c1d0f594744 (diff)
downloadCMake-fb99b0b87b616e2045e2112ec99bb9f0ff08b128.zip
CMake-fb99b0b87b616e2045e2112ec99bb9f0ff08b128.tar.gz
CMake-fb99b0b87b616e2045e2112ec99bb9f0ff08b128.tar.bz2
Merge branch 'cuda-dlink-no-deprecated-gpu' into release-3.9
Diffstat (limited to 'Modules/Platform')
-rw-r--r--Modules/Platform/Windows-NVIDIA-CUDA.cmake12
1 files changed, 10 insertions, 2 deletions
diff --git a/Modules/Platform/Windows-NVIDIA-CUDA.cmake b/Modules/Platform/Windows-NVIDIA-CUDA.cmake
index 845fa4b..970c2c6 100644
--- a/Modules/Platform/Windows-NVIDIA-CUDA.cmake
+++ b/Modules/Platform/Windows-NVIDIA-CUDA.cmake
@@ -30,10 +30,18 @@ set(CMAKE_CUDA_LINK_EXECUTABLE
unset(_CMAKE_VS_LINK_EXE)
unset(_CMAKE_VS_LINK_EXE)
+if(CMAKE_CUDA_COMPILER_VERSION VERSION_GREATER_EQUAL "8.0.0")
+ set(_CMAKE_CUDA_EXTRA_DEVICE_LINK_FLAGS "-Wno-deprecated-gpu-targets")
+else()
+ set(_CMAKE_CUDA_EXTRA_DEVICE_LINK_FLAGS "")
+endif()
+
set(CMAKE_CUDA_DEVICE_LINK_LIBRARY
- "<CMAKE_CUDA_COMPILER> <CMAKE_CUDA_LINK_FLAGS> <LANGUAGE_COMPILE_FLAGS> -shared -dlink <OBJECTS> -o <TARGET> <LINK_LIBRARIES> -Xcompiler=-Fd<TARGET_COMPILE_PDB>,-FS")
+ "<CMAKE_CUDA_COMPILER> <CMAKE_CUDA_LINK_FLAGS> <LANGUAGE_COMPILE_FLAGS> ${_CMAKE_CUDA_EXTRA_DEVICE_LINK_FLAGS} -shared -dlink <OBJECTS> -o <TARGET> <LINK_LIBRARIES> -Xcompiler=-Fd<TARGET_COMPILE_PDB>,-FS")
set(CMAKE_CUDA_DEVICE_LINK_EXECUTABLE
- "<CMAKE_CUDA_COMPILER> <FLAGS> <CMAKE_CUDA_LINK_FLAGS> -shared -dlink <OBJECTS> -o <TARGET> <LINK_LIBRARIES> -Xcompiler=-Fd<TARGET_COMPILE_PDB>,-FS")
+ "<CMAKE_CUDA_COMPILER> <FLAGS> <CMAKE_CUDA_LINK_FLAGS> ${_CMAKE_CUDA_EXTRA_DEVICE_LINK_FLAGS} -shared -dlink <OBJECTS> -o <TARGET> <LINK_LIBRARIES> -Xcompiler=-Fd<TARGET_COMPILE_PDB>,-FS")
+
+unset(_CMAKE_CUDA_EXTRA_DEVICE_LINK_FLAGS)
string(REPLACE "/D" "-D" _PLATFORM_DEFINES_CUDA "${_PLATFORM_DEFINES}${_PLATFORM_DEFINES_CXX}")