Bug 5701423: Add MSVC-specific flag /Zc:preprocessor as CCCL change the warning of this flag to error

This commit is contained in:
Shawn Zeng
2026-01-07 15:32:34 +08:00
parent 70fcdd353f
commit 17113ea87e
3 changed files with 9 additions and 4 deletions

View File

@@ -22,6 +22,11 @@ endif()
set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} --extended-lambda")
# Add MSVC-specific flags for standard-conforming preprocessor (required for CCCL)
if(MSVC)
add_compile_options($<$<COMPILE_LANGUAGE:CUDA>:-Xcompiler=/Zc:preprocessor>)
endif()
# Include installation configuration before processing samples
include(cmake/InstallSamples.cmake)