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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
project('xlease', 'c',
default_options: [
'buildtype=debugoptimized',
'c_std=gnu99',
],
version: '0.99.901',
meson_version: '>= 0.42.0',
)
cc = meson.get_compiler('c')
if cc.get_id() == 'gcc' or cc.get_id() == 'clang'
test_wflags = [
'-Wall',
'-Wpointer-arith',
'-Wmissing-declarations',
'-Wformat=2',
'-Wstrict-prototypes',
'-Wmissing-prototypes',
'-Wnested-externs',
'-Wbad-function-cast',
'-Wold-style-definition',
'-Wunused',
'-Wuninitialized',
'-Wshadow',
'-Wmissing-noreturn',
'-Wmissing-format-attribute',
'-Wredundant-decls',
'-Werror=implicit',
'-Werror=nonnull',
'-Werror=init-self',
'-Werror=main',
'-Werror=missing-braces',
'-Werror=sequence-point',
'-Werror=return-type',
'-Werror=trigraphs',
'-Werror=array-bounds',
'-Werror=write-strings',
'-Werror=address',
'-Werror=int-to-pointer-cast',
'-Werror=pointer-to-int-cast',
]
else
test_wflags = []
endif
common_wflags = []
foreach wflag: test_wflags
if cc.has_argument(wflag)
common_wflags += [ wflag ]
endif
endforeach
add_global_arguments(common_wflags, language : 'c')
xcb_xrandr_dep = [
dependency('xcb', version : '>= 1.12'),
dependency('xcb-randr', version : '>= 1.12')
]
e = executable(
'xlease',
'xlease.c',
dependencies: xcb_xrandr_dep,
install: true,
)
|