-
Notifications
You must be signed in to change notification settings - Fork 0
/
wscript
84 lines (65 loc) · 2.18 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
# -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
import sys
import os
from waflib import Logs, Utils, Context
top = "."
out = "build"
def options(opt):
opt.load(['compiler_cxx', 'gnu_dirs'])
opt.load(['default-compiler-flags',
'compiler-features',
'dependency-checker'],
tooldir=['.waf-tools'])
opt.add_option('--with-tests',
action='store_true',
default=False,
dest='with_tests',
help='''Build unit tests''')
def configure(conf):
print('→ configuring the project in ' + conf.path.abspath())
conf.load(['compiler_cxx', 'gnu_dirs',
'default-compiler-flags',
'compiler-features',
'dependency-checker'])
conf.env.DEFINES = ["ELPP_FEATURE_CRASH_LOG"]
if sys.platform != 'win32':
conf.env.LIB = ["boost_system", "ndn-cxx"]
conf.env.LIBPATH = ["/usr/local/lib"]
conf.env.INCLUDES = ["/usr/local/include"]
conf.check_cfg(package='libndn-cxx',
args=['--cflags', '--libs'],
uselib_store='NDN_CXX', mandatory=True)
if conf.options.with_tests:
conf.env['WITH_TESTS'] = 1
conf.define('WITH_TESTS', 1)
def build(bld):
# bld(
# target = "homesec-objcts",
# name = "homesec-objcts",
# features = "cxx",
# source=bld.path.ant_glob(['src/**/*.cpp',
# 'src/**/*.cc'],
# excl=['src/main.cpp']),
# use = "NDN_CXX",
# includes = [".", "src"],
# export_includes='src'
# )
bld(
target = "homesec-objcts",
name = "homesec-objcts",
features = "cxx",
source=bld.path.ant_glob(['src/**/*.cc',
'src/**/*.cpp'],
excl=['src/main.cpp']),
use = "NDN_CXX",
includes = [".", "src"],
export_includes='src'
)
bld(
source="src/main.cpp",
features="cxx cxxprogram",
target="homesec",
use="homesec-objcts",
includes = [".", "src"]
)
bld.recurse("tests")