Skip to content

Commit 35eceb5

Browse files
committed
build: globally define NOMINMAX on Windows in CMake
1 parent c013ad2 commit 35eceb5

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -408,8 +408,8 @@ add_compile_definitions(CPPHTTPLIB_THREAD_POOL_COUNT=8)
408408

409409
# Platform-specific compiler definitions
410410
if(WIN32)
411-
# Set Windows target version to Windows 10 for httplib v0.26.0
412-
add_compile_definitions(_WIN32_WINNT=0x0A00)
411+
# Set Windows target version to Windows 10 for httplib v0.26.0, and prevent Windows.h min/max macro definitions
412+
add_compile_definitions(_WIN32_WINNT=0x0A00 NOMINMAX)
413413
if(MSVC)
414414
# Add security-hardening compiler flags for MSVC
415415
# Control Flow Guard - prevents control flow hijacking

0 commit comments

Comments
 (0)