Skip to content

Commit

Permalink
Disable c++ exception by default in windows
Browse files Browse the repository at this point in the history
  • Loading branch information
Qiuwen-chen committed Jul 12, 2024
1 parent 76a46d7 commit 077c061
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,11 @@ if (WCDB_ZSTD)
target_compile_definitions(${TARGET_NAME} PRIVATE WCDB_ZSTD=1)
endif ()

target_compile_options(${TARGET_NAME} PRIVATE -fno-exceptions)
if (WIN32)
target_compile_options(${TARGET_NAME} PRIVATE /EHsc)
else ()
target_compile_options(${TARGET_NAME} PRIVATE -fno-exceptions)
endif()

if (WCDB_CPP)
target_sources(${TARGET_NAME} PRIVATE ${WCDB_CPP_SRC})
Expand Down

0 comments on commit 077c061

Please sign in to comment.