From: Markus Frosch Date: Thu, 4 Apr 2019 10:20:52 +0000 (+0200) Subject: windows: Disable optimization for boost::context X-Git-Tag: v2.11.0-rc1~160^2~5 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1ab23c20fbae18390c03af42ff938aa2e92c415e;p=icinga2 windows: Disable optimization for boost::context --- diff --git a/CMakeLists.txt b/CMakeLists.txt index dc71122da..4ddfa2649 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -112,8 +112,12 @@ if(WIN32) set(Boost_USE_STATIC_LIBS ON) # Disabled for linking issues for newer Boost versions, they link against Windows SDKs #add_definitions(-DBOOST_ALL_NO_LIB) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /bigobj") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj") + + # Disable optimization for Boost::context + # https://www.boost.org/doc/libs/1_69_0/libs/context/doc/html/context/overview.html + # https://docs.microsoft.com/en-us/cpp/build/reference/gl-whole-program-optimization?view=vs-2017 + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /bigobj /GL- /EHs") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj /GL- /EHs") endif() if(NOT DEFINED LOGROTATE_HAS_SU)