diff options
author | Robert Maynard <robert.maynard@kitware.com> | 2017-05-11 17:33:10 (GMT) |
---|---|---|
committer | Robert Maynard <robert.maynard@kitware.com> | 2017-05-11 17:42:42 (GMT) |
commit | 036ffe815acd1ea4ee5cafb1b9547930bfbdbebf (patch) | |
tree | 582ca9cd688b5f9a45df68ba5689205f5df1b63e /Modules/Compiler/NVIDIA-CUDA.cmake | |
parent | b69e061b8073efbd2c356f4508ea401c85e8dae3 (diff) | |
download | CMake-036ffe815acd1ea4ee5cafb1b9547930bfbdbebf.zip CMake-036ffe815acd1ea4ee5cafb1b9547930bfbdbebf.tar.gz CMake-036ffe815acd1ea4ee5cafb1b9547930bfbdbebf.tar.bz2 |
CUDA: Add support for the C++14 standard flag.
CUDA 9 toolkit has announced support for C++14 flag, so lets allow users
to use it.
Diffstat (limited to 'Modules/Compiler/NVIDIA-CUDA.cmake')
-rw-r--r-- | Modules/Compiler/NVIDIA-CUDA.cmake | 6 |
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() |