diff --git a/cmake/ConfigureCompiler.cmake b/cmake/ConfigureCompiler.cmake index f3cb94406f..8e40053919 100644 --- a/cmake/ConfigureCompiler.cmake +++ b/cmake/ConfigureCompiler.cmake @@ -44,7 +44,11 @@ set(CMAKE_REQUIRED_LIBRARIES c) if(WIN32) + # see: https://docs.microsoft.com/en-us/windows/desktop/WinProg/using-the-windows-headers + # this sets the windows target version to Windows 7 + set(WINDOWS_TARGET 0x0601) add_compile_options(/W3 /EHsc /std:c++14 /bigobj $<$:/Zi>) + add_compile_definitions(_WIN32_WINNT=${WINDOWS_TARGET} BOOST_ALL_NO_LIB) else() if(USE_GOLD_LINKER) set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fuse-ld=gold -Wl,--disable-new-dtags") diff --git a/flow/Platform.cpp b/flow/Platform.cpp index 8d358229b8..27369f469b 100644 --- a/flow/Platform.cpp +++ b/flow/Platform.cpp @@ -47,6 +47,7 @@ #include "flow/FaultInjection.h" #ifdef _WIN32 +#include #define NOMINMAX #include #include