Skip to content

Commit 4cbdbdf

Browse files
committed
build: fix weird issue with MSVC not enabling exceptions?
1 parent 24ade3d commit 4cbdbdf

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ target_include_directories(Nostalgia
121121

122122
if(MSVC)
123123
target_compile_features(Nostalgia PUBLIC cxx_std_23)
124+
target_compile_options(Nostalgia PUBLIC -EHsc)
124125
set_property(TARGET Nostalgia PROPERTY
125126
MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
126127
set_property(TARGET Jolt PROPERTY
@@ -188,6 +189,7 @@ if(BUILD_EDITOR)
188189

189190
if(MSVC)
190191
target_compile_features(NostalgiaGoggles PUBLIC cxx_std_23)
192+
target_compile_options(NostalgiaGoggles PUBLIC -EHsc)
191193
set_property(TARGET NostalgiaGoggles PROPERTY
192194
MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
193195
else()
@@ -216,6 +218,7 @@ function(add_test_target TARGET_NAME TARGET_SOURCES)
216218
if(MSVC)
217219
target_include_directories(${TARGET_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} PRIVATE ${NOSTALGIA_ROOT}/thirdparty)
218220
target_compile_features(${TARGET_NAME} PUBLIC cxx_std_23)
221+
target_compile_options(${TARGET_NAME} PUBLIC -EHsc)
219222
set_property(TARGET ${TARGET_NAME} PROPERTY
220223
MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
221224
else()

0 commit comments

Comments
 (0)