forked from dlang-community/containers
-
Notifications
You must be signed in to change notification settings - Fork 0
/
meson.build
82 lines (72 loc) · 1.99 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
project('dcontainers', 'd',
meson_version: '>=0.44',
license: 'BSL-1.0',
version: '0.8.0'
)
project_soversion = '0'
#
# Sources
#
dcontainers_src = [
'src/containers/cyclicbuffer.d',
'src/containers/dynamicarray.d',
'src/containers/hashmap.d',
'src/containers/hashset.d',
'src/containers/immutablehashset.d',
'src/containers/internal/backwards.d',
'src/containers/internal/element_type.d',
'src/containers/internal/hash.d',
'src/containers/internal/mixins.d',
'src/containers/internal/node.d',
'src/containers/internal/storage_type.d',
'src/containers/openhashset.d',
'src/containers/package.d',
'src/containers/simdset.d',
'src/containers/slist.d',
'src/containers/treemap.d',
'src/containers/ttree.d',
'src/containers/unrolledlist.d'
]
src_dir = include_directories('src/')
#
# Targets
#
dcontainers_lib = static_library('dcontainers',
[dcontainers_src],
include_directories: [src_dir],
install: true,
)
pkgc = import('pkgconfig')
pkgc.generate(name: 'dcontainers',
libraries: [dcontainers_lib],
subdirs: 'd/containers',
version: meson.project_version(),
description: 'Containers backed by std.experimental.allocator.'
)
# for use by others which embed this as subproject
dcontainers_dep = declare_dependency(
link_with: [dcontainers_lib],
include_directories: [src_dir],
)
#
# Tests
#
extra_args = ['-main']
dcontainers_test_exe = executable('test_dcontainers',
[dcontainers_src,
'test/compile_test.d',
'test/external_allocator_test.d'],
include_directories: [src_dir],
d_unittest: true,
link_args: extra_args
)
test('test_dcontainers', dcontainers_test_exe)
# the looptest is a manual test, so we don't run it and only compile it
looptest_test_exe = executable('test_looptest',
['test/looptest.d'],
dependencies: [dcontainers_dep]
)
#
# Install
#
install_subdir('src/containers/', install_dir: 'include/d/containers/')