File tree Expand file tree Collapse file tree 1 file changed +17
-7
lines changed Expand file tree Collapse file tree 1 file changed +17
-7
lines changed Original file line number Diff line number Diff line change @@ -21,16 +21,26 @@ set( CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin" )
2121set ( CMAKE_CXX_STANDARD 20 )
2222
2323if ( UNIX )
24- set (CMAKE_C_FLAGS " ${CMAKE_C_FLAGS} \
25- -Wall -Wextra \
26- -Wno-unused-parameter \
27- -Wno-cast-function-type \
28- -Wsign-compare -Werror" )
29- set ( CMAKE_CXX_FLAGS " ${CMAKE_CXX_FLAGS} \
30- -Wall -Wextra \
24+ set (COMMON_COMPILER_FLAGS
25+ " -Wall -Wextra \
26+ -Wpedantic \
27+ -Wpointer-arith \
28+ -Wcast-align \
29+ -Wwrite-strings \
30+ -Wswitch-enum \
3131 -Wno-unused-parameter \
3232 -Wno-cast-function-type \
33+ -Wnull-dereference \
34+ -Wold-style-definition \
35+ -Wswitch-enum \
36+ -Wredundant-decls \
37+ -Wformat=2 \
38+ -Wmissing-prototypes \
39+ -Wmissing-declarations \
40+ -Wno-c11-extensions \
3341 -Wsign-compare -Werror" )
42+ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${COMMON_COMPILER_FLAGS} " )
43+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${COMMON_COMPILER_FLAGS} " )
3444 if (USE_COVERAGE)
3545 set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --coverage" )
3646 set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --coverage" )
You can’t perform that action at this time.
0 commit comments