Skip to content

Commit

Permalink
Avoid MSVC compiler warning about C++ exceptions being used
Browse files Browse the repository at this point in the history
The exact warning reads:

	C++ exception handler used, but unwind semantics are not
	enabled.

Signed-off-by: Johannes Schindelin <[email protected]>
  • Loading branch information
dscho committed Mar 13, 2021
1 parent eb37f79 commit 7b7b35d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ if (NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
set(CMAKE_CXX_FLAGS "-Wall -Wparentheses -Winline -Wbad-function-cast -Wdisabled-optimization -Wextra")
else()
message(STATUS "MSVC compiler in use")
set(CMAKE_CXX_FLAGS "/Wall /W4")
set(CMAKE_CXX_FLAGS "/Wall /W4 /EHsc")
endif()

add_compile_definitions(NAPI_CPP_EXCEPTIONS)
Expand Down

0 comments on commit 7b7b35d

Please sign in to comment.