Debian Codegraph @

cmake/compilers/gnu.cmake

raw
1 # GNU style (GCC/Clang) compiler specific settings
2
3 if(NOT CMAKE_C_COMPILER_ID STREQUAL "GNU" AND NOT CMAKE_C_COMPILER_ID MATCHES "^(Apple)?Clang$")
4 return()
5 endif()
6
7 enable_language(ASM)
8
9 set(ASM_SOURCES
10 ${SOURCE_DIR}/asm/ftola.c
11 ${SOURCE_DIR}/asm/snapvector.c
12 )
13
14 add_compile_options(-Wall -Wimplicit -Wshadow
15 -Wstrict-prototypes -Wformat=2 -Wformat-security
16 -Wstrict-aliasing=2 -Wmissing-format-attribute
17 -Wdisabled-optimization -Werror-implicit-function-declaration)
18
19 add_compile_options(-Wno-format-zero-length -Wno-format-nonliteral)
20
21 # There are lots of instances of union based aliasing in the code
22 # that rely on the compiler not optimising them away, so disable it
23 add_compile_options(-fno-strict-aliasing)
24
25 # This is necessary to hide all symbols unless explicitly exported
26 # via the Q_EXPORT macro
27 add_compile_options(-fvisibility=hidden)