Skip to content

Commit 290df63

Browse files
committed
build: spell -fno-exceptions for MSVC
We did not disable exceptions when building with cl, do so like we do with the GCC style driver.
1 parent 5aeea6e commit 290df63

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,9 @@ if(WIN32)
174174
PRIVATE
175175
_CRT_NONSTDC_NO_WARNINGS)
176176
endif()
177-
if(NOT "${CMAKE_C_SIMULATE_ID}" STREQUAL "MSVC")
177+
if("${CMAKE_C_SIMULATE_ID}" STREQUAL "MSVC")
178+
target_compile_options(dispatch PRIVATE /EHs-c-)
179+
else()
178180
target_compile_options(dispatch PRIVATE -fno-exceptions)
179181
endif()
180182
if(DISPATCH_ENABLE_ASSERTS)

0 commit comments

Comments
 (0)