Skip to content

Commit a5f6a24

Browse files
ryanmeiera-maurice
authored andcommitted
Add -DNOMINMAX to app's CMakeLists.txt on Windows to fix an Open Source compile error
PiperOrigin-RevId: 251881627
1 parent 7913774 commit a5f6a24

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

app/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,12 @@ else()
294294
add_definitions(-include assert.h -include string.h)
295295
endif()
296296

297+
# Ensure min/max macros don't get declared on Windows
298+
# (so we can use std::min/max)
299+
if(MSVC)
300+
add_definitions(-DNOMINMAX)
301+
endif()
302+
297303
if(IOS)
298304
# Enable Automatic Reference Counting (ARC).
299305
set_property(

0 commit comments

Comments
 (0)