summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorRobert Maynard <rmaynard@nvidia.com>2022-06-01 13:20:08 (GMT)
committerRobert Maynard <rmaynard@nvidia.com>2022-06-13 18:56:58 (GMT)
commit6377a43814bb6f3087b731644bb61302a3fc3c55 (patch)
tree8fbf509f2d3d05d74e1b72a4095dcd898a826c37 /Modules
parent87273cc9d3b7073a1c175f73b241be16b566b47c (diff)
downloadCMake-6377a43814bb6f3087b731644bb61302a3fc3c55.zip
CMake-6377a43814bb6f3087b731644bb61302a3fc3c55.tar.gz
CMake-6377a43814bb6f3087b731644bb61302a3fc3c55.tar.bz2
CUDA: Support response files with nvcc
Diffstat (limited to 'Modules')
-rw-r--r--Modules/Compiler/NVIDIA-CUDA.cmake16
1 files changed, 10 insertions, 6 deletions
diff --git a/Modules/Compiler/NVIDIA-CUDA.cmake b/Modules/Compiler/NVIDIA-CUDA.cmake
index 2f12b43..892df90 100644
--- a/Modules/Compiler/NVIDIA-CUDA.cmake
+++ b/Modules/Compiler/NVIDIA-CUDA.cmake
@@ -127,15 +127,19 @@ else()
endif()
-# FIXME: investigate use of --options-file.
-# Tell Makefile generator that nvcc does not support @<rspfile> syntax.
-set(CMAKE_CUDA_USE_RESPONSE_FILE_FOR_INCLUDES 0)
-set(CMAKE_CUDA_USE_RESPONSE_FILE_FOR_LIBRARIES 0)
-set(CMAKE_CUDA_USE_RESPONSE_FILE_FOR_OBJECTS 0)
-
if (CMAKE_CUDA_COMPILER_VERSION VERSION_GREATER_EQUAL "9.0")
set(CMAKE_CUDA_RESPONSE_FILE_DEVICE_LINK_FLAG "--options-file ")
set(CMAKE_CUDA_RESPONSE_FILE_FLAG "--options-file ")
endif()
+if (CMAKE_CUDA_COMPILER_VERSION VERSION_GREATER_EQUAL "11.0")
+ set(CMAKE_CUDA_USE_RESPONSE_FILE_FOR_INCLUDES 1)
+ set(CMAKE_CUDA_USE_RESPONSE_FILE_FOR_LIBRARIES 1)
+ set(CMAKE_CUDA_USE_RESPONSE_FILE_FOR_OBJECTS 1)
+else()
+ set(CMAKE_CUDA_USE_RESPONSE_FILE_FOR_INCLUDES 0)
+ set(CMAKE_CUDA_USE_RESPONSE_FILE_FOR_LIBRARIES 0)
+ set(CMAKE_CUDA_USE_RESPONSE_FILE_FOR_OBJECTS 0)
+endif()
+
__compiler_check_default_language_standard(CUDA 6.0 03)