]> granicus.if.org Git - icinga2/commitdiff
windows: Disable optimization for boost::context
authorMarkus Frosch <markus.frosch@icinga.com>
Thu, 4 Apr 2019 10:20:52 +0000 (12:20 +0200)
committerMarkus Frosch <markus.frosch@icinga.com>
Fri, 5 Apr 2019 07:03:04 +0000 (09:03 +0200)
CMakeLists.txt

index dc71122da31a3f55045fca8ee3df36a57b584fe9..4ddfa2649e5e03234d9a2eec95997fc4ffbcede1 100644 (file)
@@ -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)