build: add waf-tool to simplify building with AddressSanitizer & friends

Change-Id: If36e52f5e49d94ad5846165c50504d06d7d3c4d0
Refs: #2589
This commit is contained in:
Davide Pesavento committed 2016-08-14 11:34:09 +02:00
1 parent 244feac1d1
commit 89d9175e7c
8 files changed
+41 -29

No files matched your search

+7 -7
View File
@@ -8,15 +8,17 @@ import os
def options(opt):
opt.load(['compiler_cxx', 'gnu_dirs'])
opt.load(['default-compiler-flags', 'sanitizers', 'sphinx_build', 'boost'],
tooldir=['.waf-tools'])
opt.load(['default-compiler-flags', 'sphinx_build', 'boost'], tooldir=['.waf-tools'])
opt.add_option('--with-tests', action='store_true', default=False,
dest='with_tests', help='''Build unit tests''')
opt.recurse("tools")
opt.recurse('tools')
def configure(conf):
conf.load(['compiler_cxx', 'gnu_dirs',
'default-compiler-flags', 'sphinx_build', 'boost'])
'default-compiler-flags', 'sanitizers', 'sphinx_build', 'boost'])
if 'PKG_CONFIG_PATH' not in os.environ:
os.environ['PKG_CONFIG_PATH'] = Utils.subst_vars('${LIBDIR}/pkgconfig', conf.env)
@@ -35,14 +37,12 @@ def configure(conf):
def build(bld):
bld.env['VERSION'] = VERSION
bld(
target='core-objects',
bld(target='core-objects',
name='core-objects',
features='cxx',
source=bld.path.ant_glob(['core/*.cpp']),
use='NDN_CXX BOOST',
export_includes='.',
)
export_includes='.')
bld.recurse('tools')
bld.recurse('tests')