Skip to content

Commit 46a36a4

Browse files
committed
build: Add NOMINMAX definition for MSVC compatibility
1 parent 2a15fa0 commit 46a36a4

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/stdgpu/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,8 @@ target_compile_features(stdgpu PUBLIC cxx_std_17)
132132
target_compile_options(stdgpu PRIVATE ${STDGPU_DEVICE_FLAGS}
133133
${STDGPU_HOST_FLAGS})
134134

135+
target_compile_definitions(stdgpu PUBLIC $<$<CXX_COMPILER_ID:MSVC>:NOMINMAX>)
136+
135137
target_link_libraries(stdgpu PUBLIC thrust::thrust)
136138

137139
set_target_properties(stdgpu PROPERTIES CXX_CLANG_TIDY "${STDGPU_PROPERTY_CLANG_TIDY}")

0 commit comments

Comments
 (0)