summaryrefslogtreecommitdiffstats
path: root/Modules/Compiler
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-05-12 13:13:16 (GMT)
committerKitware Robot <kwrobot@kitware.com>2017-05-12 13:13:19 (GMT)
commit592206a157a57da031cd44d86269a92cfb17a736 (patch)
tree4026389779f027a41cc8a215c01f19301485c3a1 /Modules/Compiler
parent040de18b36cddba470684e73f3a6bdcaa28474bd (diff)
parent036ffe815acd1ea4ee5cafb1b9547930bfbdbebf (diff)
downloadCMake-592206a157a57da031cd44d86269a92cfb17a736.zip
CMake-592206a157a57da031cd44d86269a92cfb17a736.tar.gz
CMake-592206a157a57da031cd44d86269a92cfb17a736.tar.bz2
Merge topic 'add_cuda_cxx14_flag'
036ffe81 CUDA: Add support for the C++14 standard flag. Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !830
Diffstat (limited to 'Modules/Compiler')
-rw-r--r--Modules/Compiler/NVIDIA-CUDA.cmake6
1 files changed, 6 insertions, 0 deletions
diff --git a/Modules/Compiler/NVIDIA-CUDA.cmake b/Modules/Compiler/NVIDIA-CUDA.cmake
index 316cab8..785e269 100644
--- a/Modules/Compiler/NVIDIA-CUDA.cmake
+++ b/Modules/Compiler/NVIDIA-CUDA.cmake
@@ -24,4 +24,10 @@ else()
set(CMAKE_CUDA98_EXTENSION_COMPILE_OPTION "")
set(CMAKE_CUDA11_STANDARD_COMPILE_OPTION "-std=c++11")
set(CMAKE_CUDA11_EXTENSION_COMPILE_OPTION "-std=c++11")
+
+ if (NOT CMAKE_CUDA_COMPILER_VERSION VERSION_LESS 9.0)
+ set(CMAKE_CUDA14_STANDARD_COMPILE_OPTION "-std=c++14")
+ set(CMAKE_CUDA14_EXTENSION_COMPILE_OPTION "-std=c++14")
+ endif()
+
endif()