File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,10 @@ else()
31
31
if (${BUILD_SHARED_LIBS} )
32
32
set_target_properties (nodesoup PROPERTIES POSITION_INDEPENDENT_CODE TRUE )
33
33
endif ()
34
+
35
+ if (MSVC )
36
+ target_compile_options (nodesoup PRIVATE /EHsc )
37
+ endif ()
34
38
endif ()
35
39
36
40
# Install (only necessary for static lib build)
Original file line number Diff line number Diff line change @@ -102,6 +102,8 @@ if(MSVC)
102
102
target_compile_options (matplot PUBLIC /wd4305 )
103
103
# Fix compile error caused by utf8 character in line_spec.cpp
104
104
target_compile_options (matplot PUBLIC /utf-8 )
105
+ # Allow exceptions
106
+ target_compile_options (matplot PRIVATE /EHsc )
105
107
endif ()
106
108
107
109
include (CheckSymbolExists )
@@ -137,10 +139,12 @@ if (BUILD_WITH_PEDANTIC_WARNINGS)
137
139
else ()
138
140
target_compile_options (matplot PRIVATE -Wall -Wextra -pedantic -Werror )
139
141
# Allow the warnings related to the bundled CImg
140
- if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" )
142
+ if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang" )
141
143
target_compile_options (matplot PRIVATE -Wno-null-pointer-arithmetic -Wno-char-subscripts )
142
144
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" )
143
145
target_compile_options (matplot PRIVATE -Wno-error=class-memaccess -Wno-class-memaccess )
146
+ else ()
147
+ message (ERROR "Cannot disable the relevant warnings for ${CMAKE_CXX_COMPILER_ID} " )
144
148
endif ()
145
149
endif ()
146
150
endif ()
You can’t perform that action at this time.
0 commit comments