blob: c4cbfbf648147e1eebb2c3a2eb5ebc820e078316 [file] [log] [blame]
# -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
from waflib import Utils
top = '..'
def build(bld):
bld(features=['cxx', 'pch'],
name='tests-base',
target='tests-base',
headers=['../src/common-pch.hpp', 'boost-test.hpp'],
use='ndn-cxx',
includes='.',
)
unit_tests = bld(
target="unit-test-objects",
name="unit-test-objects",
features="cxx",
source=bld.path.ant_glob(['unit-tests/**/*.cpp'],
excl=['**/*-osx.cpp', '**/*-sqlite3.cpp']),
use='tests-base',
includes='.',
install_path=None,
)
integrated = bld(
target="integrated-test-objects",
name="integrated-test-objects",
features="cxx",
source=bld.path.ant_glob(['integrated/**/*.cpp'],
excl=['**/*-osx.cpp', '**/*-sqlite3.cpp']),
use='tests-base',
includes='.',
install_path=None,
)
if bld.env['HAVE_OSX_SECURITY']:
unit_tests.source += bld.path.ant_glob('unit-tests/**/*-osx.cpp')
integrated.source += bld.path.ant_glob('integrated/**/*-osx.cpp')
# In case we want to make it optional later
unit_tests.source += bld.path.ant_glob('unit-tests/**/*-sqlite3.cpp')
integrated.source += bld.path.ant_glob('integrated/**/*-sqlite3.cpp')
bld(features='cxx',
target='unit-tests-main-unit',
name='unit-tests-main-unit',
source=bld.path.ant_glob(['*.cpp']),
use='ndn-cxx',
defines=['BOOST_TEST_MODULE=ndn-cxx Unit Tests'],
)
bld(features='cxx',
target='unit-tests-main-integrated',
name='unit-tests-main-integrated',
source=bld.path.ant_glob(['*.cpp']),
use='ndn-cxx',
defines=['BOOST_TEST_MODULE=ndn-cxx Integrated Tests'],
)
bld(features="cxx cxxprogram",
target="../unit-tests",
use="unit-test-objects unit-tests-main-unit",
install_path=None)
bld(features="cxx cxxprogram",
target="../integrated-tests",
use="integrated-test-objects unit-tests-main-integrated",
install_path=None)