blob: 31f7e9088ec751d4ee10b1595b9459555ea0207f (
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: Tue Jul 3 18:00:33 UTC 2012
Subject: build system
respect flags
--- CMakeLists.txt
+++ CMakeLists.txt
@@ -57,40 +57,13 @@
add_cxxflag("-std=c++11")
-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_ldflag("-Wl,--as-needed")
-
check_symbol_exists(isatty "unistd.h" HAVE_ISATTY)
check_symbol_exists(ioctl "sys/ioctl.h" HAVE_IOCTL)
|