diff options
author | Robert Maynard <robert.maynard@kitware.com> | 2017-09-26 13:25:35 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-09-26 15:08:09 (GMT) |
commit | fe37b99473df00b69beede10ad4ed2472c375d4d (patch) | |
tree | b8663cee56ee7d7412ea0b8a6be2ddac477cad71 /Modules/Compiler | |
parent | 95df03a1d44d48b5407dd0ddc9e618ce2f17762b (diff) | |
download | CMake-fe37b99473df00b69beede10ad4ed2472c375d4d.zip CMake-fe37b99473df00b69beede10ad4ed2472c375d4d.tar.gz CMake-fe37b99473df00b69beede10ad4ed2472c375d4d.tar.bz2 |
CUDA: Add support for requesting C++98 under CUDA 9
Starting in CUDA 9 the default compilation mode is C++14, and you need
to explicitly enable C++98/03 mode.
While at it, document `14` among the values for `CUDA_STANDARD`. This
was accidentally left out of commit v3.9.0-rc1~118^2 (CUDA: Add support
for the C++14 standard flag, 2017-05-11).
Diffstat (limited to 'Modules/Compiler')
-rw-r--r-- | Modules/Compiler/NVIDIA-CUDA.cmake | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Modules/Compiler/NVIDIA-CUDA.cmake b/Modules/Compiler/NVIDIA-CUDA.cmake index 785e269..1c91654 100644 --- a/Modules/Compiler/NVIDIA-CUDA.cmake +++ b/Modules/Compiler/NVIDIA-CUDA.cmake @@ -26,6 +26,8 @@ else() set(CMAKE_CUDA11_EXTENSION_COMPILE_OPTION "-std=c++11") if (NOT CMAKE_CUDA_COMPILER_VERSION VERSION_LESS 9.0) + set(CMAKE_CUDA98_STANDARD_COMPILE_OPTION "-std=c++03") + set(CMAKE_CUDA98_EXTENSION_COMPILE_OPTION "-std=c++03") set(CMAKE_CUDA14_STANDARD_COMPILE_OPTION "-std=c++14") set(CMAKE_CUDA14_EXTENSION_COMPILE_OPTION "-std=c++14") endif() |