summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeCUDAInformation.cmake
diff options
context:
space:
mode:
authorRobert Maynard <robert.maynard@kitware.com>2019-08-06 19:04:59 (GMT)
committerRobert Maynard <robert.maynard@kitware.com>2019-08-06 19:44:15 (GMT)
commita233e4e7d9c157cae0098762d8a7add463fb3492 (patch)
tree15b5bf844956643db07ed0f9de74f5a6b60b0bad /Modules/CMakeCUDAInformation.cmake
parentfdaad9a067e8fa55816d9cef2481450fc5b1f18b (diff)
downloadCMake-a233e4e7d9c157cae0098762d8a7add463fb3492.zip
CMake-a233e4e7d9c157cae0098762d8a7add463fb3492.tar.gz
CMake-a233e4e7d9c157cae0098762d8a7add463fb3492.tar.bz2
CUDA: Compilers can now state they don't require a device linking step
Diffstat (limited to 'Modules/CMakeCUDAInformation.cmake')
-rw-r--r--Modules/CMakeCUDAInformation.cmake3
1 files changed, 2 insertions, 1 deletions
diff --git a/Modules/CMakeCUDAInformation.cmake b/Modules/CMakeCUDAInformation.cmake
index 43ae989..b0d80d1 100644
--- a/Modules/CMakeCUDAInformation.cmake
+++ b/Modules/CMakeCUDAInformation.cmake
@@ -171,7 +171,8 @@ if(NOT CMAKE_CUDA_LINK_EXECUTABLE)
"<CMAKE_CUDA_HOST_LINK_LAUNCHER> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>${__IMPLICT_LINKS}")
endif()
-if(CMAKE_CUDA_COMPILER_VERSION VERSION_GREATER_EQUAL "8.0.0")
+if( CMAKE_CUDA_COMPILER_ID STREQUAL "NVIDIA" AND
+ 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 "")