-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmeson.build
64 lines (56 loc) · 1.38 KB
/
meson.build
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('hashtable-sandbox', 'c',
default_options : [
'warning_level=3',
'werror=true',
'buildtype=release',
'strip=true',
],
license : 'MIT',
meson_version: '>= 0.47',
)
cc = meson.get_compiler('c')
configuration_inc = include_directories('src')
flags = ['-Wshadow',
'-Wstrict-prototypes',
'-Wmissing-prototypes',
'-Wno-padded',
]
add_project_arguments(cc.get_supported_arguments(flags), language : 'c')
all_sources = []
subdir('src')
if get_option('tests')
subdir('tests')
endif # get_option('tests')
#
# DEVTOOLS
#
uncrustify = find_program('uncrustify', required : false)
if uncrustify.found()
run_target('checkstyle',
command : [
uncrustify,
'-l', 'c',
'-c', join_paths(meson.source_root(), 'devtools', 'uncrustify.cfg'),
'--check',
all_sources,
],
)
run_target('fixstyle',
command : [
uncrustify,
'-l', 'c',
'-c', join_paths(meson.source_root(), 'devtools', 'uncrustify.cfg'),
'--replace',
all_sources,
],
)
endif # uncrustify
codespell = find_program('codespell', required : false)
if codespell.found()
run_target('spelling',
command : [
codespell,
all_sources,
]
)
endif # codespell