File tree 1 file changed +10
-9
lines changed
1 file changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -4,28 +4,29 @@ target_compile_options(${PROJECT} PUBLIC
4
4
-Werror
5
5
-Wfatal-errors
6
6
-Wdouble-promotion
7
- #-Wstrict-prototypes
8
- -Wstrict-overflow
9
- #-Werror-implicit-function-declaration
10
7
-Wfloat-equal
11
- #-Wundef
12
8
-Wshadow
13
9
-Wwrite-strings
14
10
-Wsign-compare
15
11
-Wmissing-format-attribute
16
12
-Wunreachable-code
17
13
-Wcast-align
18
- -Wcast-function-type
19
14
-Wcast-qual
20
15
-Wnull-dereference
21
16
-Wuninitialized
22
17
-Wunused
23
18
-Wredundant-decls
19
+ #-Wstrict-prototypes
20
+ #-Werror-implicit-function-declaration
21
+ #-Wundef
24
22
)
25
23
26
- # GCC version 9 or prior has a bug with incorrect Wconversion warnings
24
+ # GCC 10
27
25
if (CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 10.0)
28
- target_compile_options (${PROJECT} PUBLIC
29
- -Wconversion
30
- )
26
+ target_compile_options (${PROJECT} PUBLIC -Wconversion)
27
+ endif ()
28
+
29
+ # GCC 8
30
+ if (CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 8.0)
31
+ target_compile_options (${PROJECT} PUBLIC -Wcast-function-type -Wstrict-overflow)
31
32
endif ()
You can’t perform that action at this time.
0 commit comments