-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwscript
42 lines (35 loc) · 1.32 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
#!/usr/bin/env python
TOP = '.'
APPNAME = 'WCP'
# the sequence matters
subdirs = [
'nanoflann',
'ress',
]
def options(opt):
opt.load('doxygen', tooldir='waf-tools')
opt.load('find_package', tooldir='waf-tools')
opt.add_option('--build-debug', default='-O2',
help="Build with debug symbols")
opt.add_option('--doxygen-tarball', default=None,
help="Build Doxygen documentation to a tarball")
def configure(cfg):
cfg.env.append_unique('CXXFLAGS',['--std=c++14'])
cfg.load( "compiler_cxx" )
cfg.load('doxygen', tooldir='waf-tools')
cfg.load('find_package', tooldir='waf-tools')
cfg.env.CXXFLAGS += [cfg.options.build_debug, "-Wno-deprecated-declarations"]
cfg.check_boost(lib='system filesystem graph')
def build(bld):
bld.load('find_package', tooldir='waf-tools')
for pkg,ext in dict(paal="GLPK_H", pid="GLPK_H").items():
have='HAVE_'+ext
if have in bld.env:
continue
if pkg in subdirs:
print ('Removing package "%s" due to lack of "%s"'%(pkg,ext))
subdirs.remove(pkg)
bld.recurse(subdirs)
if bld.env.DOXYGEN and bld.options.doxygen_tarball:
bld(features="doxygen", doxyfile=bld.path.find_resource('Doxyfile'),
doxy_tar = bld.options.doxygen_tarball)