diff options
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index b5c411f4..7bf0987b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -513,6 +513,8 @@ if(CMAKE_COMPILER_IS_GNUCC OR "${CMAKE_C_COMPILER_ID}" MATCHES "Clang") check_c_compiler_flag(-Wunreachable-code HAVE_GCC_UNREACHABLE_CODE) check_c_compiler_flag(-Wvarargs HAVE_GCC_VARARGS) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden -Wno-deprecated -Wall -Wno-unknown-pragmas -Wextra -Winit-self -Wunused -Wno-div-by-zero -Wundef -Wpointer-arith -Wtype-limits -Wwrite-strings -Werror=return-type") + #for more modern C + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wold-style-definition -Wstrict-prototypes") if(HAVE_GCC_UNUSED_BUT_SET) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wunused-but-set-variable") endif() |