mirror of
https://github.com/HarbourMasters/Shipwright
synced 2026-09-29 03:17:52 -04:00
Keep /EHsc when clearing the MSVC default flags (#7185)
The MSVC block drops CMake's defaults wholesale, and /EHsc goes with them, so Windows builds compile every try/catch without unwind semantics - cl only warns (C4530). soh and libultraship have 25 of them between them, including the config and archive paths in OTRGlobals, where a throw would skip destructors. clang-cl refuses outright rather than warning, which is how this surfaced.
This commit is contained in:
+2
-1
@@ -59,7 +59,8 @@ if(MSVC)
|
||||
set(CMAKE_C_FLAGS "")
|
||||
set(CMAKE_C_FLAGS_DEBUG "")
|
||||
set(CMAKE_C_FLAGS_RELEASE "")
|
||||
set(CMAKE_CXX_FLAGS "")
|
||||
# Keep /EHsc: the code uses try/catch.
|
||||
set(CMAKE_CXX_FLAGS "/EHsc")
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "")
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user