|
| 1 | +commit d01c9a429b25fcea8f5b77547adc23f3fede0471 |
| 2 | +Author: Arha Gatram <agatram@nvidia.com> |
| 3 | +Date: Wed Jun 10 15:53:55 2026 +0000 |
| 4 | + |
| 5 | + CUDA: Add support for cuda_std_23 for nvcc 13.3+ |
| 6 | + |
| 7 | + CUDA 13.3 has been released with support for `-std=c++23`. |
| 8 | + |
| 9 | +diff --git a/Modules/Compiler/NVIDIA.cmake b/Modules/Compiler/NVIDIA.cmake |
| 10 | +index 0d0f03ad00..5bf7044159 100644 |
| 11 | +--- a/Modules/Compiler/NVIDIA.cmake |
| 12 | ++++ b/Modules/Compiler/NVIDIA.cmake |
| 13 | +@@ -46,6 +46,14 @@ macro(__compiler_nvidia_cxx_standards lang) |
| 14 | + set(CMAKE_${lang}_STANDARD_LATEST 20) |
| 15 | + endif() |
| 16 | + endif() |
| 17 | ++ |
| 18 | ++ if (NOT CMAKE_${lang}_COMPILER_VERSION VERSION_LESS 13.3) |
| 19 | ++ if(CMAKE_${lang}_SIMULATE_VERSION VERSION_GREATER_EQUAL 19.29.30129) |
| 20 | ++ set(CMAKE_${lang}23_STANDARD_COMPILE_OPTION "-std=c++23") |
| 21 | ++ set(CMAKE_${lang}23_EXTENSION_COMPILE_OPTION "-std=c++23") |
| 22 | ++ set(CMAKE_${lang}_STANDARD_LATEST 23) |
| 23 | ++ endif() |
| 24 | ++ endif() |
| 25 | + else() |
| 26 | + set(CMAKE_${lang}03_STANDARD_COMPILE_OPTION "") |
| 27 | + set(CMAKE_${lang}03_EXTENSION_COMPILE_OPTION "") |
| 28 | +@@ -75,6 +83,12 @@ macro(__compiler_nvidia_cxx_standards lang) |
| 29 | + set(CMAKE_${lang}20_EXTENSION_COMPILE_OPTION "-std=c++20") |
| 30 | + set(CMAKE_${lang}_STANDARD_LATEST 20) |
| 31 | + endif() |
| 32 | ++ |
| 33 | ++ if (NOT CMAKE_${lang}_COMPILER_VERSION VERSION_LESS 13.3) |
| 34 | ++ set(CMAKE_${lang}23_STANDARD_COMPILE_OPTION "-std=c++23") |
| 35 | ++ set(CMAKE_${lang}23_EXTENSION_COMPILE_OPTION "-std=c++23") |
| 36 | ++ set(CMAKE_${lang}_STANDARD_LATEST 23) |
| 37 | ++ endif() |
| 38 | + endif() |
| 39 | + |
| 40 | + __compiler_check_default_language_standard(${lang} 6.0 03) |
0 commit comments