forked from libmir/mir-algorithm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
meson.build
152 lines (133 loc) · 3.54 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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
project('mir-algorithm', 'cpp', 'd', version : '3.7.0', license: 'Apache-2.0',
default_options : ['cpp_std=c++1z'])
description = 'Mir Algorithm - Dlang Core Library'
subprojects = ['mir-core']
has_cpp_headers = true
sources_list = [
'mir/algebraic_alias/ion',
'mir/algebraic_alias/json',
'mir/algebraic_alias/transform',
'mir/algorithm/iteration',
'mir/algorithm/setops',
'mir/annotated',
'mir/appender',
'mir/array/allocation',
'mir/base64',
'mir/bignum/decimal',
'mir/bignum/fixed',
'mir/bignum/fp',
'mir/bignum/integer',
'mir/bignum/internal/dec2float_table',
'mir/bignum/internal/dec2float',
'mir/bignum/internal/kernel',
'mir/bignum/internal/phobos_kernel',
'mir/bignum/internal/ryu/generic_128',
'mir/bignum/internal/ryu/table',
'mir/bignum/low_level_view',
'mir/combinatorics/package',
'mir/container/binaryheap',
'mir/cpp_export/numeric',
'mir/date',
'mir/ediff',
'mir/format_impl',
'mir/format',
'mir/graph/package',
'mir/graph/tarjan',
'mir/interpolate/constant',
'mir/interpolate/extrapolate',
'mir/interpolate/generic',
'mir/interpolate/linear',
'mir/interpolate/mod',
'mir/interpolate/package',
'mir/interpolate/polynomial',
'mir/interpolate/spline',
'mir/interpolate/utility',
'mir/lob',
'mir/math/func/expdigamma',
'mir/math/func/hermite',
'mir/math/func/normal',
'mir/math/numeric',
'mir/math/stat',
'mir/math/sum',
'mir/ndslice/allocation',
'mir/ndslice/chunks',
'mir/ndslice/concatenation',
'mir/ndslice/connect/cpython',
'mir/ndslice/dynamic',
'mir/ndslice/field',
'mir/ndslice/filling',
'mir/ndslice/fuse',
'mir/ndslice/internal',
'mir/ndslice/iterator',
'mir/ndslice/mutation',
'mir/ndslice/ndfield',
'mir/ndslice/package',
'mir/ndslice/slice',
'mir/ndslice/sorting',
'mir/ndslice/topology',
'mir/ndslice/traits',
'mir/numeric',
'mir/parse',
'mir/polynomial',
'mir/range',
'mir/rc/array',
'mir/rc/context',
'mir/rc/package',
'mir/rc/ptr',
'mir/rc/slim_ptr',
'mir/serde',
'mir/series',
'mir/small_array',
'mir/small_string',
'mir/string_map',
'mir/test',
'mir/timestamp',
'mir/type_info',
]
sources = []
foreach s : sources_list
sources += 'source/' + s + '.d'
endforeach
add_project_arguments([
'-preview=dip1008',
'-lowmem',
], language: 'd')
required_deps = []
foreach p : subprojects
required_deps += dependency(p, fallback : [p, 'this_dep'])
endforeach
directories = ['source']
if has_cpp_headers
directories += 'include'
endif
directories = include_directories(directories)
this_lib = library(meson.project_name(),
sources,
include_directories: directories,
install: true,
version: meson.project_version(),
dependencies: required_deps,
)
this_dep = declare_dependency(
link_with: [this_lib],
include_directories: directories,
dependencies: required_deps,
)
test_versions = ['mir_test', 'mir_bignum_test', 'mir_bignum_test_llv', 'mir_ndslice_test', 'mir_secure_memory']
if has_cpp_headers
install_subdir('include/',
strip_directory :true,
install_dir: 'include/',
)
endif
install_subdir('source/',
strip_directory : true,
install_dir: 'include/d/' + meson.project_name(),
)
import('pkgconfig').generate(this_lib,
description: description,
subdirs: 'd/' + meson.project_name(),
)
mir_algorithm_dep = this_dep
mir_algorithm_lib = this_lib
test_subdirs = ['cpp_example']