File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -88,38 +88,35 @@ function(silkit_enable_warnings isOn)
8888 /wd4389 # too many bogus signed/unsigned warnings in VS2017 Win32
8989 )
9090 endif ()
91- elseif (MINGW)
92- set (_flags
93- -pedantic
94- -Wall
95- -Wextra
96- -Wcast-align
97- -Wpacked
98- -Wno-implicit-fallthrough
99- -Wno-error=dangling-reference
100-
101- -Wno-shadow # Appears in ThirdParty/spdlog/include/spdlog/common.h:214:9
102- -Wno-format # MinGW-gcc does not recognize %zu
103- -Wno-unused-parameter # follow up of the %zu format bug, a lot of unused parameters
104- -Wstrict-overflow=1 # > 1 fails in fmt-6.1.0
105- ${_warnAsError}
106- )
10791 else ()
10892 set (_flags
10993 -pedantic
11094 -Wall
11195 -Wextra
96+
11297 -Wcast-align
11398 -Wpacked
114- -Wno-implicit-fallthrough
11599 -Wformat=2
100+ -Wmissing-declarations
101+ -Wundef
102+ -Wunused
103+ -Wstrict-overflow=2
116104
117- -Wno-shadow # Appears in ThirdParty/spdlog/include/spdlog/common.h:214:9
118- -Wno-format-nonliteral # Warning in fmt-6.1.0/include/fmt/chrono.h:392:48
119- -Wstrict-overflow=1 # > 1 fails in fmt-6.1.0
120105 ${_warnAsError}
121- )
106+ )
107+ endif ()
122108
109+ if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" )
110+ set (_flags ${_flags}
111+ -Wimplicit-fallthrough=2
112+ )
113+ endif ()
114+
115+ if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang" )
116+ set (_flags ${_flags}
117+ -Wno-implicit-fallthrough
118+ -Wno-undef
119+ )
123120 endif ()
124121
125122 # Suppress flaky dangling-reference warning
Original file line number Diff line number Diff line change @@ -56,12 +56,10 @@ if(UNIX)
5656 #make sure we don't compile obviously bad code
5757 target_compile_options (O_SilKit_Extensions
5858 PRIVATE
59- -pedantic -Wall -Wextra
60- -Wcast-align -Wformat=2 -Wmissing-declarations
61- -Wshadow -Wsign-conversion -Wsign-promo -Wstrict-overflow=5
62- -Wundef -Wno-unused
63- -Wpacked
64- -Werror -Wfatal-errors
59+ -Wshadow
60+ -Wsign-conversion
61+ -Wsign-promo
62+ -Wstrict-overflow=5
6563 )
6664
6765elseif (MSVC OR MINGW)
You can’t perform that action at this time.
0 commit comments