-
Notifications
You must be signed in to change notification settings - Fork 14
/
meson.build
49 lines (39 loc) · 1.21 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
project('phoebe', 'c', default_options : ['c_std=gnu99', 'warning_level=2'])
incdir = include_directories('headers')
nl3 = dependency('libnl-3.0')
nl_nf_3 = dependency('libnl-nf-3.0')
json_c = dependency('json-c')
pthread = dependency('threads')
cc = meson.get_compiler('c')
m = cc.find_library('m', required : true)
dl = cc.find_library('dl', required : true)
options = [
['print_messages', 'PRINT_MSGS'],
['print_advanced_messages', 'PRINT_ADV_MSGS'],
['print_table', 'PRINT_TABLE'],
['apply_changes', 'APPLY_CHANGES'],
['check_initial_settings', 'CHECK_INITIAL_SETTINGS'],
['m_threads', 'M_THREADS'],
['use_linear_regression', 'LINEAR_REGRESSION']
]
if get_option('b_sanitize') == 'undefined'
add_global_arguments('-fno-sanitize-recover', language : 'c')
endif
if cc.get_id() == 'clang' and (
get_option('b_sanitize') == 'undefined' or get_option('b_sanitize') == 'address'
)
add_project_link_arguments('-shared-libasan', language : 'c')
endif
foreach opt : options
if get_option(opt[0])
add_project_arguments('-D@0@'.format(opt[1]), language : 'c')
endif
endforeach
subdir('conf')
subdir('src')
subdir('scripts')
subdir('dist')
if get_option('with_tests')
subdir('tests')
endif
subdir('csv_files')