Skip to content

Commit f9b94fe

Browse files
authored
Merge pull request #183 from BillyONeal/fix-msvc-cuda-13-2
Add /Zc:preprocessor for CUDA 13.2 on MSVC.
2 parents 77d1d28 + db99cdf commit f9b94fe

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ target_link_libraries(popsift
4949
set_target_properties(popsift PROPERTIES VERSION ${PROJECT_VERSION})
5050
set_target_properties(popsift PROPERTIES DEBUG_POSTFIX "d")
5151
set_target_properties(popsift PROPERTIES CUDA_SEPARABLE_COMPILATION ON)
52+
if(MSVC)
53+
target_compile_options(popsift PRIVATE $<$<COMPILE_LANGUAGE:CUDA>:-Xcompiler=/Zc:preprocessor>)
54+
endif()
5255

5356
# build directory containing the automatically generated files
5457
set(popsift_generated_dir "${CMAKE_CURRENT_BINARY_DIR}/generated")

0 commit comments

Comments
 (0)