-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwscript
executable file
·185 lines (156 loc) · 5.01 KB
/
wscript
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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
#!/usr/bin/env python
import os
def depends(ctx):
# not actually a dependency, but build tests by default
ctx.recurse('test')
ctx('code-format')
ctx('halco')
ctx('halbe')
ctx('halco')
ctx('euter')
ctx('euter', 'pycellparameters')
ctx('rant')
ctx('logger')
ctx('lib-boost-patches')
ctx('pythonic')
ctx('pywrap')
def options(opt):
opt.load('compiler_cxx')
opt.load('boost')
opt.load('doxygen')
def configure(cfg):
cfg.load('compiler_cxx')
cfg.load('boost')
cfg.load('doxygen')
# runtime library loading
cfg.check_cxx(
lib='dl',
uselib_store='DL4CALIBTIC',
mandatory=True)
cfg.check_cxx(
lib='log4cxx',
uselib_store='LOG4CALIBTIC',
mandatory=True)
cfg.check_boost(
lib='filesystem serialization system',
uselib_store='BOOST4CALIBTIC')
cfg.check_boost(
lib='filesystem serialization system',
uselib_store='BOOST4CALIBTICBINARY')
cfg.check_boost(
lib='filesystem serialization system',
uselib_store='BOOST4CALIBTICTEXT')
cfg.check_boost(
lib='filesystem serialization system',
uselib_store='BOOST4CALIBTICXML')
cfg.check_cxx(
lib=['gsl', 'gslcblas'],
uselib_store='GSL4CALIBTIC')
def build(bld):
bld(
target='calibtic_inc',
export_includes=['include']
)
bld.shlib(
features='cxx cxxshlib',
target='calibtic',
source=bld.path.ant_glob('src/calibtic/**/*.cpp'),
use=[
'BOOST4CALIBTIC',
'DL4CALIBTIC',
'LOG4CALIBTIC',
'calibtic_inc',
'rant',
'pywrap',
'boost_serialization',
'halco_hicann_v2' # FIXME: artificial; only needed because of BOOST_MPL_LIMIT_LIST_SIZE
],
# gccxml requires non-variadic implementation of boost::variant for python wrappers
defines='BOOST_VARIANT_DO_NOT_USE_VARIADIC_TEMPLATES',
export_defines='BOOST_VARIANT_DO_NOT_USE_VARIADIC_TEMPLATES',
install_path='${PREFIX}/lib',
)
bld(target="hmf_calibration",
features = "use",
use = ["_hmf_calibration", "calibtic_xml", "calibtic_text", "calibtic_binary"]
)
bld(
target = '_hmf_calibration',
features = 'cxx cxxshlib',
source = bld.path.ant_glob('src/HMF/**/*.cpp'),
use = [
'GSL4CALIBTIC',
'calibtic',
'halbe_container',
'halco_hicann_v2',
'euter',
'pythonic',
'cellparameters_access',
'logger_obj',
],
install_path = '${PREFIX}/lib',
)
for tool in bld.path.ant_glob('tools/*.cpp'):
bld(
target = os.path.splitext(tool.name)[0],
features = 'cxx cxxprogram',
source = tool,
use = ['hmf_calibration'],
install_path = '${PREFIX}/bin',
)
for tool in bld.path.ant_glob('tools/*.py'):
bld.install_as(os.path.join('${PREFIX}/bin',
os.path.splitext(tool.name)[0]),
tool,
chmod=0o755)
bld.shlib(
features='cxx cxxshlib',
target = 'calibtic_binary',
source = bld.path.ant_glob('src/backends/binary/*.cpp'),
use = [
'BOOST4CALIBTICBINARY',
'calibtic',
'_hmf_calibration',
],
includes = '.',
install_path = '${PREFIX}/lib',
)
bld.shlib(
features='cxx cxxshlib',
target = 'calibtic_text',
source = bld.path.ant_glob('src/backends/text/*.cpp'),
use = [
'BOOST4CALIBTICTEXT',
'calibtic',
'_hmf_calibration',
],
includes = '.',
install_path = '${PREFIX}/lib',
)
flags = {
"lib" : [ 'dl', ],
}
bld.shlib(
features = 'cxx cxxshlib',
target = 'calibtic_xml',
source = bld.path.ant_glob('src/backends/xml/*.cpp'),
use = [
'BOOST4CALIBTICXML',
'calibtic',
'_hmf_calibration',
],
includes = '.',
install_path = '${PREFIX}/lib',
**flags
)
def doc(dcx):
'''build documentation (doxygen)'''
dcx(
features = 'doxygen',
doxyfile = dcx.root.make_node('%s/code-format/doxyfile' % dcx.env.PREFIX),
install_path = 'doc/calibtic',
pars = {
"PROJECT_NAME": "\"Calibration database for BrainScaleS-1\"",
"INPUT": "%s/calibtic/include/calibtic" % dcx.env.PREFIX
},
)