summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordimitri staessens <dimitri.staessens@intec.ugent.be>2016-10-23 11:30:45 +0200
committerdimitri staessens <dimitri.staessens@intec.ugent.be>2016-10-23 11:38:42 +0200
commit7f464d1c56468d859c917b5d0c8aa985be48e6db (patch)
tree9edd60df1f0625e7dffa1aae9c657bd37fcb5bbd
parentd0d329cbde5ea67f1ab16481b4e93c873ed9b19c (diff)
downloadouroboros-7f464d1c56468d859c917b5d0c8aa985be48e6db.tar.gz
ouroboros-7f464d1c56468d859c917b5d0c8aa985be48e6db.zip
build: Disable compilation flags
pthread_cleanup handlers make gcc and clang fail the -Wclobbered check in release builds. Swig generates switch statements without a default, making the -Wswitch-default check fail. The -Wstrict-overflow=5 flag was removed.
-rw-r--r--CMakeLists.txt7
1 files changed, 4 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3ab2f35e..ef321e4c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -41,13 +41,14 @@ include(FindPkgConfig)
include(CompilerUtils)
test_and_set_c_compiler_flag_global(-std=c89)
test_and_set_c_compiler_flag_global(-Wall)
-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)
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)
test_and_set_c_compiler_flag_global(-Wstrict-prototypes)
-test_and_set_c_compiler_flag_global(-Wswitch-default)
-test_and_set_c_compiler_flag_global(-Wstrict-overflow=5)
+#Wswitch-default check fails on the swig-generated code
+#test_and_set_c_compiler_flag_global(-Wswitch-default)
test_and_set_c_compiler_flag_global(-Wunreachable-code)
test_and_set_c_compiler_flag_global(-Wdeclaration-after-statement)
test_and_set_c_compiler_flag_global(-fmax-errors=5)