windows: Disable SAFESEH on x86

This commit is contained in:
Markus Frosch 2019-04-04 14:42:58 +02:00
parent 9f82faa439
commit f70e215cc9
1 changed files with 9 additions and 0 deletions

View File

@ -122,6 +122,15 @@ if(WIN32)
# 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")
# detect if 32-bit target
if(CMAKE_VS_PLATFORM_NAME STREQUAL "Win32")
# SAFESEH is not supported in Boost on Windows x86
# maybe it is when Boost is compiled with it...
# https://lists.boost.org/Archives/boost/2013/10/206720.php
# https://docs.microsoft.com/en-us/cpp/build/reference/safeseh-image-has-safe-exception-handlers?view=vs-2017
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SAFESEH:NO")
endif()
endif()
if(NOT DEFINED LOGROTATE_HAS_SU)