summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Maynard <robert.maynard@kitware.com>2020-06-10 17:27:51 (GMT)
committerRobert Maynard <robert.maynard@kitware.com>2020-06-10 17:27:51 (GMT)
commit95700be52d860aa4f4e5b4c7562c9bb97acb4b2a (patch)
tree7d73836d1f8776cfc9b3a6f3e184e6f9dd044342
parent596cfd26809793c7165b5e5047be133e0419c6e5 (diff)
downloadCMake-95700be52d860aa4f4e5b4c7562c9bb97acb4b2a.zip
CMake-95700be52d860aa4f4e5b4c7562c9bb97acb4b2a.tar.gz
CMake-95700be52d860aa4f4e5b4c7562c9bb97acb4b2a.tar.bz2
CUDA: Teach CMake that NVCC 11 supports cuda_std_17
-rw-r--r--Modules/Compiler/NVIDIA-CUDA.cmake11
1 files changed, 11 insertions, 0 deletions
diff --git a/Modules/Compiler/NVIDIA-CUDA.cmake b/Modules/Compiler/NVIDIA-CUDA.cmake
index 87607e2..feb5ecc 100644
--- a/Modules/Compiler/NVIDIA-CUDA.cmake
+++ b/Modules/Compiler/NVIDIA-CUDA.cmake
@@ -78,6 +78,12 @@ if("x${CMAKE_CUDA_SIMULATE_ID}" STREQUAL "xMSVC")
set(CMAKE_CUDA14_STANDARD_COMPILE_OPTION "")
set(CMAKE_CUDA14_EXTENSION_COMPILE_OPTION "")
endif()
+
+ if (NOT CMAKE_CUDA_COMPILER_VERSION VERSION_LESS 11.0)
+ set(CMAKE_CUDA17_STANDARD_COMPILE_OPTION "")
+ set(CMAKE_CUDA17_EXTENSION_COMPILE_OPTION "")
+ endif()
+
else()
set(CMAKE_CUDA03_STANDARD_COMPILE_OPTION "")
set(CMAKE_CUDA03_EXTENSION_COMPILE_OPTION "")
@@ -92,6 +98,11 @@ else()
set(CMAKE_CUDA14_EXTENSION_COMPILE_OPTION "-std=c++14")
endif()
+ if (NOT CMAKE_CUDA_COMPILER_VERSION VERSION_LESS 11.0)
+ set(CMAKE_CUDA17_STANDARD_COMPILE_OPTION "-std=c++17")
+ set(CMAKE_CUDA17_EXTENSION_COMPILE_OPTION "-std=c++17")
+ endif()
+
endif()
# FIXME: investigate use of --options-file.