Skip to content

Commit 7b7b35d

Browse files
committed
Avoid MSVC compiler warning about C++ exceptions being used
The exact warning reads: C++ exception handler used, but unwind semantics are not enabled. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent eb37f79 commit 7b7b35d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ if (NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
3737
set(CMAKE_CXX_FLAGS "-Wall -Wparentheses -Winline -Wbad-function-cast -Wdisabled-optimization -Wextra")
3838
else()
3939
message(STATUS "MSVC compiler in use")
40-
set(CMAKE_CXX_FLAGS "/Wall /W4")
40+
set(CMAKE_CXX_FLAGS "/Wall /W4 /EHsc")
4141
endif()
4242

4343
add_compile_definitions(NAPI_CPP_EXCEPTIONS)

0 commit comments

Comments
 (0)