-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwscript
More file actions
executable file
·72 lines (63 loc) · 2.37 KB
/
wscript
File metadata and controls
executable file
·72 lines (63 loc) · 2.37 KB
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
#!/usr/bin/env python
import os
from os.path import join
from waflib.extras.test_base import summary
from waflib.extras.symwaf2ic import get_toplevel_path
def depends(dep):
# we can't build the documentation in the wafer app
if (os.environ.get("SINGULARITY_APPNAME") is None) or ("wafer" not in os.environ.get("SINGULARITY_APPNAME")):
dep('code-format')
def options(opt):
opt.load('compiler_cxx')
opt.load('gtest')
# we can't build the documentation in the wafer app
if (os.environ.get("SINGULARITY_APPNAME") is None) or ("wafer" not in os.environ.get("SINGULARITY_APPNAME")):
opt.load("doxygen")
def configure(cfg):
cfg.load('compiler_cxx')
cfg.check_cxx(mandatory=True, header_name='cereal/cereal.hpp')
cfg.load('gtest')
# we can't build the documentation in the wafer app
if (os.environ.get("SINGULARITY_APPNAME") is None) or ("wafer" not in os.environ.get("SINGULARITY_APPNAME")):
cfg.load("doxygen")
def build(bld):
bld.install_files(
dest = '${PREFIX}/',
files = bld.path.ant_glob('include/hate/**/*.(h)'),
name = 'hate_header',
relative_trick = True
)
bld(
target = 'hate_inc',
export_includes = 'include',
use = 'hate_header',
)
bld.shlib(
source = bld.path.ant_glob('src/**/*.cpp'),
target='hate',
use = 'hate_inc',
)
# unit tests
bld(
features = 'cxx cxxprogram gtest',
source = bld.path.ant_glob('tests/**/*.cpp'),
target='hate_tests',
use = 'hate',
test_timeout = 120,
)
# documentation
# we can't build the documentation in the wafer app
if ((os.environ.get("SINGULARITY_APPNAME") is None) or ("wafer" not in os.environ.get("SINGULARITY_APPNAME"))) and bld.env.DOXYGEN:
bld(
target = 'doxygen_hate',
features = 'doxygen',
doxyfile = bld.root.make_node(join(get_toplevel_path(), "code-format", "doxyfile")),
doxy_inputs = 'include/hate',
install_path = 'doc/hate',
pars = {
"PROJECT_NAME": "\"Helpers and Tools Ensemble library\"",
"INCLUDE_PATH": join(get_toplevel_path(), "hate", "include"),
"OUTPUT_DIRECTORY": join(get_toplevel_path(), "build", "hate", "doc")
},
)
bld.add_post_fun(summary)