summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-08-26 14:25:37 (GMT)
committerKitware Robot <kwrobot@kitware.com>2020-08-26 14:25:44 (GMT)
commit57c1be6e1574bffed1e80390054fc193a3245732 (patch)
treeb190610337334a6a73592cca5b92ee7ae46846ff /Modules
parent4767548733ad3ef354c2312b2bda628a6f80bb59 (diff)
parentbed315a0da0030a9124ccc8f0518a56cac7205b9 (diff)
downloadCMake-57c1be6e1574bffed1e80390054fc193a3245732.zip
CMake-57c1be6e1574bffed1e80390054fc193a3245732.tar.gz
CMake-57c1be6e1574bffed1e80390054fc193a3245732.tar.bz2
Merge topic 'cuda-std-for-msvc' into release-3.18
bed315a0da CUDA: Support setting CUDA14/17 when using MSVC Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5160
Diffstat (limited to 'Modules')
-rw-r--r--Modules/Compiler/NVIDIA-CUDA.cmake10
1 files changed, 6 insertions, 4 deletions
diff --git a/Modules/Compiler/NVIDIA-CUDA.cmake b/Modules/Compiler/NVIDIA-CUDA.cmake
index feb5ecc..3187294 100644
--- a/Modules/Compiler/NVIDIA-CUDA.cmake
+++ b/Modules/Compiler/NVIDIA-CUDA.cmake
@@ -68,20 +68,22 @@ if(UNIX)
endif()
if("x${CMAKE_CUDA_SIMULATE_ID}" STREQUAL "xMSVC")
+ # MSVC requires c++14 as the minimum level
set(CMAKE_CUDA03_STANDARD_COMPILE_OPTION "")
set(CMAKE_CUDA03_EXTENSION_COMPILE_OPTION "")
+ # MSVC requires c++14 as the minimum level
set(CMAKE_CUDA11_STANDARD_COMPILE_OPTION "")
set(CMAKE_CUDA11_EXTENSION_COMPILE_OPTION "")
if (NOT CMAKE_CUDA_COMPILER_VERSION VERSION_LESS 9.0)
- set(CMAKE_CUDA14_STANDARD_COMPILE_OPTION "")
- set(CMAKE_CUDA14_EXTENSION_COMPILE_OPTION "")
+ set(CMAKE_CUDA14_STANDARD_COMPILE_OPTION "-std=c++14")
+ 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 "")
- set(CMAKE_CUDA17_EXTENSION_COMPILE_OPTION "")
+ set(CMAKE_CUDA17_STANDARD_COMPILE_OPTION "-std=c++17")
+ set(CMAKE_CUDA17_EXTENSION_COMPILE_OPTION "-std=c++17")
endif()
else()