summaryrefslogtreecommitdiffstats
path: root/cmake/CompilerFlags.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/CompilerFlags.cmake')
-rw-r--r--cmake/CompilerFlags.cmake4
1 files changed, 4 insertions, 0 deletions
diff --git a/cmake/CompilerFlags.cmake b/cmake/CompilerFlags.cmake
index cd9021cd0..5558c346b 100644
--- a/cmake/CompilerFlags.cmake
+++ b/cmake/CompilerFlags.cmake
@@ -16,6 +16,10 @@ function(add_supported_cxx_flags target)
endif()
foreach(flag ${flags})
+ # /EHa enables SEH on Windows, it is not available in Linux.
+ if(NOT CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
+ string(REGEX REPLACE "/EHa" "" flag "${flag}")
+ endif()
# remove the `no-` prefix from warnings because gcc doesn't treat it as an
# error on its own
string(REGEX REPLACE "\\-Wno\\-(.+)" "-W\\1" flag_to_test "${flag}")