Lines 4-10
Link Here
|
4 |
CMAKE_C_COMPILER_ID STREQUAL "AppleClang" OR |
4 |
CMAKE_C_COMPILER_ID STREQUAL "AppleClang" OR |
5 |
CMAKE_C_COMPILER_ID STREQUAL "GNU") |
5 |
CMAKE_C_COMPILER_ID STREQUAL "GNU") |
6 |
|
6 |
|
7 |
add_compile_options (-Wall -Wextra -Werror) |
7 |
add_compile_options (-Wall -Wextra) |
8 |
add_compile_options (-Wformat -Wformat-nonliteral -Wformat-security) |
8 |
add_compile_options (-Wformat -Wformat-nonliteral -Wformat-security) |
9 |
add_compile_options (-Wshadow) |
9 |
add_compile_options (-Wshadow) |
10 |
add_compile_options (-Wcast-qual) |
10 |
add_compile_options (-Wcast-qual) |
Lines 12-21
Link Here
|
12 |
add_compile_options (-Wbad-function-cast) |
12 |
add_compile_options (-Wbad-function-cast) |
13 |
add_compile_options (-pedantic -pedantic-errors) |
13 |
add_compile_options (-pedantic -pedantic-errors) |
14 |
add_compile_options (-fpie -fpic) |
14 |
add_compile_options (-fpie -fpic) |
15 |
if (NOT FUZZ) |
|
|
16 |
add_compile_options(-O2) |
17 |
add_definitions (-D_FORTIFY_SOURCE=2) |
18 |
endif () |
19 |
|
15 |
|
20 |
check_c_compiler_flag("-fstack-protector-all" HAVE_STACK_PROTECTOR_ALL) |
16 |
check_c_compiler_flag("-fstack-protector-all" HAVE_STACK_PROTECTOR_ALL) |
21 |
if (HAVE_STACK_PROTECTOR_ALL) |
17 |
if (HAVE_STACK_PROTECTOR_ALL) |