From 0e434b94706a4b1c812dcae966d9c72fb1958644 Mon Sep 17 00:00:00 2001 From: David Benjamin Date: Thu, 2 Apr 2015 13:20:01 -0400 Subject: [PATCH] Define NOMINMAX across the entire project. This fixes the standalone build on Windows and matches Chromium. Change-Id: I194f53e0a610c5ae9cef53c826b22f7bded5f357 Reviewed-on: https://boringssl-review.googlesource.com/4201 Reviewed-by: Adam Langley --- CMakeLists.txt | 1 + tool/digest.cc | 1 - tool/transport_common.cc | 1 - 3 files changed, 1 insertion(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8ee4d3d8..dd7183e5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -63,6 +63,7 @@ elseif(MSVC) set(CMAKE_CXX_FLAGS "-Wall -WX ${MSVC_DISABLED_WARNINGS_STR}") add_definitions(-D_HAS_EXCEPTIONS=0) add_definitions(-DWIN32_LEAN_AND_MEAN) + add_definitions(-DNOMINMAX) endif() if((CMAKE_COMPILER_IS_GNUCXX AND CMAKE_C_COMPILER_VERSION VERSION_GREATER "4.7.99") OR diff --git a/tool/digest.cc b/tool/digest.cc index f95f4120..4acf97c8 100644 --- a/tool/digest.cc +++ b/tool/digest.cc @@ -32,7 +32,6 @@ #define O_BINARY 0 #endif #else -#define NOMINMAX #pragma warning(push, 3) #include #pragma warning(pop) diff --git a/tool/transport_common.cc b/tool/transport_common.cc index 9400fe61..8d6013b6 100644 --- a/tool/transport_common.cc +++ b/tool/transport_common.cc @@ -31,7 +31,6 @@ #include #include #else -#define NOMINMAX #include #pragma warning(push, 3) #include