summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authordimitri staessens <dimitri.staessens@intec.ugent.be>2016-10-23 11:50:40 +0200
committerdimitri staessens <dimitri.staessens@intec.ugent.be>2016-10-23 11:50:40 +0200
commit355d873559554ad4fc09869fc926ee3e7caea7b5 (patch)
treea8bb0865bd1515ae904f3d317f807661073974b4 /CMakeLists.txt
parent322d0a2a350b63cec13f5e5dff3fc632ba0c5565 (diff)
downloadouroboros-355d873559554ad4fc09869fc926ee3e7caea7b5.tar.gz
ouroboros-355d873559554ad4fc09869fc926ee3e7caea7b5.zip
build: Explicitly add compiler flags
All flags from the -Wextra group but -Wclobbered are added.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt19
1 files 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)