summaryrefslogtreecommitdiff
blob: 756f089a579e58132bdf9d89b42d02f53387d4a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
From: Julian Ospald <hasufell@gentoo.org>
Date: Wed Jun 27 23:41:12 UTC 2012
Subject: build system

respect flags

--- CMakeLists.txt
+++ CMakeLists.txt
@@ -54,40 +54,13 @@
 link_directories("${Boost_LIBRARY_DIRS}")
 include_directories(SYSTEM "${Boost_INCLUDE_DIR}")
 
-add_cxxflag("-Wall")
-add_cxxflag("-Wextra")
-add_cxxflag("-Wformat=2")
-add_cxxflag("-Wundef")
-add_cxxflag("-Wpointer-arith")
-add_cxxflag("-Wcast-qual")
-add_cxxflag("-Woverloaded-virtual")
-add_cxxflag("-Wlogical-op")
-add_cxxflag("-Wliteral-conversion")
-add_cxxflag("-Wshift-overflow")
-add_cxxflag("-Woverflow")
-add_cxxflag("-Wbool-conversions")
-add_cxxflag("-Wconversion")
-add_cxxflag("-Wsign-conversion")
-add_cxxflag("-Wmissing-declarations")
-add_cxxflag("-Wredundant-decls")
-
 if(DEBUG_EXTRA)
 	add_cxxflag("-ftrapv") # to add checks for (undefined) signed integer overflow
 	add_cxxflag("-fbounds-checking")
 	add_cxxflag("-fcatch-undefined-behavior")
 	add_cxxflag("-Wstrict-aliasing=1")
-else()
-	# -Wuninitialized causes too many false positives - thanks very much, gcc
-	add_cxxflag("-Wno-uninitialized")
-	# (clang only) Conflicts with using const variables for configuration.
-	add_cxxflag("-Wno-constant-logical-operand")
-	add_cxxflag("-Wno-unneeded-internal-declaration")
-	add_cxxflag("-Wno-unused-function")
 endif()
 
-# Because i'm lazy
-add_cxxflag("-Wl,--as-needed")
-
 check_symbol_exists(isatty "unistd.h" HAVE_ISATTY)
 check_symbol_exists(ioctl "sys/ioctl.h" HAVE_IOCTL)