Zhiyi Zhang | 8617a79 | 2017-01-17 16:45:56 -0800 | [diff] [blame] | 1 | # -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- |
| 2 | from waflib import Utils |
| 3 | |
| 4 | top = '..' |
| 5 | |
| 6 | def build(bld): |
| 7 | if not bld.env["WITH_TESTS"]: |
| 8 | return |
| 9 | |
| 10 | tests_main = bld( |
| 11 | target='tests-main', |
| 12 | name='tests-main', |
| 13 | features='cxx', |
| 14 | source="main.cpp", |
Zhiyi Zhang | ac42185 | 2017-04-09 11:24:33 -0700 | [diff] [blame] | 15 | use='ndn-cert BOOST', |
Zhiyi Zhang | 8617a79 | 2017-01-17 16:45:56 -0800 | [diff] [blame] | 16 | ) |
| 17 | |
| 18 | unit_test = bld.program( |
| 19 | target="../unit-tests", |
| 20 | source=bld.path.ant_glob(['*.cpp', 'unit-tests/**/*.cpp'], |
| 21 | excl=['main.cpp']), |
| 22 | features=['cxx', 'cxxprogram'], |
Zhiyi Zhang | ac42185 | 2017-04-09 11:24:33 -0700 | [diff] [blame] | 23 | use='ndn-cert tests-main', |
Zhiyi Zhang | 8617a79 | 2017-01-17 16:45:56 -0800 | [diff] [blame] | 24 | includes=['.'], |
| 25 | install_path=None, |
| 26 | defines='TMP_TESTS_PATH=\"%s/tmp-tests\"' % bld.bldnode, |
| 27 | ) |