forked from libmir/mir-algorithm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmeson.build
107 lines (90 loc) · 2.98 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
project('mir-algorithm', 'cpp', 'd', version : '3.4.0', license: 'BSL-1.0',
default_options : ['cpp_std=c++1z'])
add_project_arguments([
'-dip25',
'-dip1000',
'-dip1008',
], language: 'd')
mir_algorithm_dir = include_directories('source/', 'include/')
mir_core_dep = dependency('mir-core', fallback : ['mir-core', 'mir_core_dep'])
required_deps = [mir_core_dep]
mir_algorithm_src = [
'source/mir/algorithm/iteration.d',
'source/mir/algorithm/setops.d',
'source/mir/array/allocation.d',
'source/mir/combinatorics/package.d',
'source/mir/container/binaryheap.d',
'source/mir/cpp_export/numeric.d',
'source/mir/graph/package.d',
'source/mir/graph/tarjan.d',
'source/mir/interpolate/constant.d',
'source/mir/interpolate/linear.d',
'source/mir/interpolate/package.d',
'source/mir/interpolate/pchip.d',
'source/mir/interpolate/spline.d',
'source/mir/interpolate/utility.d',
'source/mir/math/func/expdigamma.d',
'source/mir/math/numeric.d',
'source/mir/math/sum.d',
'source/mir/ndslice/allocation.d',
'source/mir/ndslice/chunks.d',
'source/mir/ndslice/concatenation.d',
'source/mir/ndslice/connect/cpython.d',
'source/mir/ndslice/dynamic.d',
'source/mir/ndslice/field.d',
'source/mir/ndslice/fuse.d',
'source/mir/ndslice/internal.d',
'source/mir/ndslice/iterator.d',
'source/mir/ndslice/mutation.d',
'source/mir/ndslice/ndfield.d',
'source/mir/ndslice/package.d',
'source/mir/ndslice/slice.d',
'source/mir/ndslice/sorting.d',
'source/mir/ndslice/topology.d',
'source/mir/ndslice/traits.d',
'source/mir/numeric.d',
'source/mir/range.d',
'source/mir/rc/array.d',
'source/mir/rc/context.d',
'source/mir/rc/package.d',
'source/mir/rc/ptr.d',
'source/mir/series.d',
'source/mir/type_info.d',
]
mir_algorithm_lib = library(meson.project_name(),
mir_algorithm_src,
include_directories: mir_algorithm_dir,
install: true,
version: meson.project_version(),
dependencies: required_deps,
)
mir_algorithm_dep = declare_dependency(
link_with: [mir_algorithm_lib],
include_directories: mir_algorithm_dir,
dependencies: required_deps,
)
install_subdir('include/',
strip_directory :true,
install_dir: 'include/',
)
install_subdir('source/',
strip_directory : true,
install_dir: 'include/d/' + meson.project_name(),
)
import('pkgconfig').generate(mir_algorithm_lib,
description: 'Mir Algorithm - Dlang Core Library for Math and Finance.',
subdirs: 'd/' + meson.project_name(),
)
if get_option('with_test')
mir_algorithm_test_exe = executable(meson.project_name() + '-test',
mir_algorithm_src,
include_directories: mir_algorithm_dir,
d_unittest: true,
d_module_versions: ['mir_test'],
link_args: '-main',
# d_args: ['-d-debug'],
dependencies: required_deps,
)
test(meson.project_name() + '-test', mir_algorithm_test_exe)
subdir('cpp_example')
endif