Skip to content

Commit af96f6d

Browse files
committed
Add NOMINMAX define
Because the windows stdlib loves defining min and max, breaking otherwise valid code calling std::min/std::max.
1 parent ae41c46 commit af96f6d

2 files changed

Lines changed: 1 addition & 2 deletions

File tree

src/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ cmake_minimum_required (VERSION 3.0)
22

33
### Basic compilation settings
44
set (CMAKE_POSITION_INDEPENDENT_CODE TRUE)
5+
add_definitions (-DNOMINMAX)
56

67
configure_file (
78
common/config.h.in

src/common/PlaintextConnection.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
#else
99
# include <winsock2.h>
1010
# include <ws2tcpip.h>
11-
# undef min
12-
# undef max
1311
#endif // USE_WINSOCK
1412

1513
#include "PlaintextConnection.h"

0 commit comments

Comments
 (0)