Skip to content

Fix compilation issue in Windows CUDA 13.2 + VS 2026#412

Open
Fangzhou-Ai wants to merge 1 commit intoNVIDIA:masterfrom
Fangzhou-Ai:master
Open

Fix compilation issue in Windows CUDA 13.2 + VS 2026#412
Fangzhou-Ai wants to merge 1 commit intoNVIDIA:masterfrom
Fangzhou-Ai:master

Conversation

@Fangzhou-Ai
Copy link
Copy Markdown

Compilaltione will fail with error info for latest CUDA + Visual studio

C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v13.2\bin/../include/cccl\cuda/std/__cccl/preprocessor.h(20): fatal error C1189: #error: MSVC/cl.exe with traditional preprocessor is used. This may lead to unexpected compilation errors. Please switch to the standard conforming preprocessor by passing /Zc:preprocessor to cl.exe. You can define CCCL_IGNORE_MSVC_TRADITIONAL_PREPROCESSOR_WARNING to suppress this warning.

Solution: add

if(WIN32)
    set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} \
        -Xcompiler=/Zc:preprocessor")
endif()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant