Skip to content

Commit 15875e0

Browse files
ryanmeiera-maurice
authored andcommitted
Add NOMINMAX define to CMakeLists.txt for Windows
This was causing a build error for open source (in user_secure_windows_internal). PiperOrigin-RevId: 246834626
1 parent 70fb5d2 commit 15875e0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

auth/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,12 @@ else()
205205
add_definitions(-include assert.h -include string.h)
206206
endif()
207207

208+
# Ensure min/max macros don't get declared on Windows
209+
# (so we can use std::min/max)
210+
if(MSVC)
211+
add_definitions(-DNOMINMAX)
212+
endif()
213+
208214
if(IOS)
209215
# Enable Automatic Reference Counting (ARC).
210216
set_property(

0 commit comments

Comments
 (0)