Skip to content

Commit 7644842

Browse files
utilForeverCopilot
andcommitted
build: enable standard preprocessor for CUDA on MSVC
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 0ca2db9 commit 7644842

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ if (USE_CUDA)
6262
"--std=c++17" "-Wno-deprecated-gpu-targets")
6363
if (CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
6464
list(APPEND CUDA_TARGET_OPTIONS "-Xcompiler" "/FS") # prevent race on PDB
65+
list(APPEND CUDA_TARGET_OPTIONS "-Xcompiler" "/Zc:preprocessor") # required by CUDA 13 + VS 2026
6566
if (CUDA_CRT_LINKAGE STREQUAL "dynamic")
6667
if (CMAKE_BUILD_TYPE MATCHES Debug)
6768
list(APPEND CUDA_TARGET_OPTIONS "-Xcompiler" "/MDd" "--debug" "-O0")

0 commit comments

Comments
 (0)