From 355d873559554ad4fc09869fc926ee3e7caea7b5 Mon Sep 17 00:00:00 2001 From: dimitri staessens Date: Sun, 23 Oct 2016 11:50:40 +0200 Subject: build: Explicitly add compiler flags All flags from the -Wextra group but -Wclobbered are added. --- CMakeLists.txt | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ef321e4c..932375b4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -41,8 +41,23 @@ include(FindPkgConfig) include(CompilerUtils) test_and_set_c_compiler_flag_global(-std=c89) test_and_set_c_compiler_flag_global(-Wall) -#Wextra may fail on clobbered warning due to pthread_cleanup -#test_and_set_c_compiler_flag_global(-Wextra) +# -Wextra may fail on clobbered warning due to pthread_cleanup +# test_and_set_c_compiler_flag_global(-Wextra) +# explicitly add other flags in -Wextra +test_and_set_c_compiler_flag_global(-Wempty-body) +test_and_set_c_compiler_flag_global(-Wignored-qualifiers) +test_and_set_c_compiler_flag_global(-Wimplicit-fallthrough) +test_and_set_c_compiler_flag_global(-Wmissing-field-initializers) +test_and_set_c_compiler_flag_global(-Wmissing-parameter-type) +test_and_set_c_compiler_flag_global(-Wold-style-declaration) +test_and_set_c_compiler_flag_global(-Woverride-init) +test_and_set_c_compiler_flag_global(-Wsign-compare) +test_and_set_c_compiler_flag_global(-Wtype-limits) +test_and_set_c_compiler_flag_global(-Wuninitialized) +test_and_set_c_compiler_flag_global(-Wshift-negative-value) +test_and_set_c_compiler_flag_global(-Wunused-parameter) +test_and_set_c_compiler_flag_global(-Wunused-but-set-parameter) +# -Wextra parameters test_and_set_c_compiler_flag_global(-Werror) test_and_set_c_compiler_flag_global(-Wundef) test_and_set_c_compiler_flag_global(-Wpointer-arith) -- cgit v1.2.3