diff options
-rw-r--r-- | Modules/Compiler/NVIDIA-CUDA.cmake | 6 | ||||
-rw-r--r-- | Source/cmLocalGenerator.cxx | 1 |
2 files changed, 7 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() diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index f584753..307024a 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -1537,6 +1537,7 @@ void cmLocalGenerator::AddCompilerRequirementFlag( langStdMap["C"].push_back("99"); langStdMap["C"].push_back("90"); + langStdMap["CUDA"].push_back("14"); langStdMap["CUDA"].push_back("11"); langStdMap["CUDA"].push_back("98"); } |