-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmeson.build
56 lines (47 loc) · 1.13 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
project(
'pms-utils',
'cpp',
version: files('version'),
default_options: ['warning_level=3', 'cpp_std=c++20'],
)
add_project_arguments(
['-fvisibility=hidden', '-fvisibility-inlines-hidden'],
language: 'cpp',
)
add_global_arguments('-DBOOST_ALL_DYN_LINK=1', language: 'cpp')
cpp = meson.get_compiler('cpp')
# Boost and nanobind are naughty
wno_args = [
'-Wno-gnu-zero-variadic-macro-arguments',
'-Wno-zero-length-array',
'-Wno-nested-anon-types',
'-Wno-pedantic',
]
foreach arg : wno_args
if cpp.has_argument(arg)
add_global_arguments(
arg,
language: 'cpp',
)
endif
endforeach
fs = import('fs')
pkg = import('pkgconfig')
boost_dep = dependency('boost', modules: ['regex'])
subdir('include')
subdir('lib')
if get_option('test')
subdir('test')
endif
if get_option('bindings').contains('python')
bindings_python = subproject(
'bindings-python',
default_options: [
'test=' + get_option('test').to_string(),
'docs=' + get_option('docs').to_string(),
],
)
endif
if get_option('docs')
subdir('docs')
endif