NVCC: Fix minimum MSVC version needed for cuda_std_20

Fix the version check from commit 0aeeb8160c (CUDA: Add support for
cuda_std_20 for nvcc 12.0+, 2022-12-09, v3.25.2~21^2).  Align the
minimum version of MSVC for supporting C++20 through `nvcc` with the
version present in `MSVC-CXX.cmake` .
This commit is contained in:
Arha Gatram
2026-06-10 15:41:34 +00:00
committed by Brad King
parent a716b664fd
commit a0762d49b2

View File

@@ -40,7 +40,7 @@ macro(__compiler_nvidia_cxx_standards lang)
endif()
if (NOT CMAKE_${lang}_COMPILER_VERSION VERSION_LESS 12.0)
if(CMAKE_${lang}_SIMULATE_VERSION VERSION_GREATER_EQUAL 19.11.25505)
if(CMAKE_${lang}_SIMULATE_VERSION VERSION_GREATER_EQUAL 19.12.25835)
set(CMAKE_${lang}20_STANDARD_COMPILE_OPTION "-std=c++20")
set(CMAKE_${lang}20_EXTENSION_COMPILE_OPTION "-std=c++20")
set(CMAKE_${lang}_STANDARD_LATEST 20)