From 9b3102a70173f0e568fc87725b58f6ea4d065a42 Mon Sep 17 00:00:00 2001 From: wmayer Date: Fri, 2 Aug 2019 14:17:38 +0200 Subject: [PATCH] if SEH option is activated remove compiler flags /EHsc or /EHs to avoid compiler warnings (D9025) --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 37eddc18df..5d9fa4836f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1223,6 +1223,9 @@ if(MSVC) set (CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /DEBUG") endif(FREECAD_RELEASE_PDB) if(FREECAD_RELEASE_SEH) + # remove /EHsc or /EHs flags because they are incompatible with /EHa + string(REPLACE "/EHsc" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) + string(REPLACE "/EHs" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /EHa") endif(FREECAD_RELEASE_SEH)