-
-
Notifications
You must be signed in to change notification settings - Fork 20
/
meson.build
90 lines (76 loc) · 2.19 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# frigg is header-only, so we do not need a compiler.
project('frigg')
incl = include_directories('include')
if not get_option('frigg_no_install')
install_headers(
'include/frg/algorithm.hpp',
'include/frg/allocation.hpp',
'include/frg/array.hpp',
'include/frg/cmdline.hpp',
'include/frg/container_of.hpp',
'include/frg/detection.hpp',
'include/frg/dyn_array.hpp',
'include/frg/eternal.hpp',
'include/frg/expected.hpp',
'include/frg/formatting.hpp',
'include/frg/functional.hpp',
'include/frg/hash.hpp',
'include/frg/hash_map.hpp',
'include/frg/interval_tree.hpp',
'include/frg/intrusive.hpp',
'include/frg/list.hpp',
'include/frg/logging.hpp',
'include/frg/macros.hpp',
'include/frg/manual_box.hpp',
'include/frg/mutex.hpp',
'include/frg/optional.hpp',
'include/frg/pairing_heap.hpp',
'include/frg/printf.hpp',
'include/frg/qs.hpp',
'include/frg/random.hpp',
'include/frg/rbtree.hpp',
'include/frg/rcu_radixtree.hpp',
'include/frg/scope_exit.hpp',
'include/frg/slab.hpp',
'include/frg/small_vector.hpp',
'include/frg/span.hpp',
'include/frg/spinlock.hpp',
'include/frg/stack.hpp',
'include/frg/std_compat.hpp',
'include/frg/string.hpp',
'include/frg/string_stub.hpp',
'include/frg/tuple.hpp',
'include/frg/unique.hpp',
'include/frg/utility.hpp',
'include/frg/variant.hpp',
'include/frg/vector.hpp',
subdir: 'frg')
pkg = import('pkgconfig')
pkg.generate(
name: 'frigg',
description: 'Lightweight C++ utilities and algorithms for system programming',
)
endif
frigg_dep = declare_dependency(include_directories: incl)
build_tests = get_option('build_tests').enabled()
if get_option('build_tests').auto()
build_tests = not meson.is_subproject()
endif
build_slab_analyzer = get_option('build_slab_analyzer').enabled()
if get_option('build_slab_analyzer').auto()
build_slab_analyzer = not meson.is_subproject()
endif
if build_tests or build_slab_analyzer
# We need C++ only for the analyzer and test suite.
add_languages('cpp')
endif
if build_tests
subdir('tests')
endif
if build_slab_analyzer
analyzer = executable(
'slab_trace_analyzer',
'slab_trace_analyzer.cpp',
override_options: ['cpp_std=c++20'],
native: true)
endif