Junxiao Shi | 2713a3b | 2015-06-22 16:19:05 -0700 | [diff] [blame] | 1 | # -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- |
| 2 | top = '..' |
| 3 | |
| 4 | def build(bld): |
| 5 | if not bld.env['WITH_TESTS']: |
| 6 | return |
| 7 | |
Junxiao Shi | 2713a3b | 2015-06-22 16:19:05 -0700 | [diff] [blame] | 8 | bld(target='../unit-tests', |
| 9 | features='cxx cxxprogram', |
Shock Jiang | 0f0bc4b | 2015-06-22 15:11:30 -0700 | [diff] [blame] | 10 | source=bld.path.ant_glob(['*.cpp'] + ['%s/**/*.cpp' % tool for tool in bld.env['BUILD_TOOLS']]), |
| 11 | use=['core-objects'] + ['%s-objects' % tool for tool in bld.env['BUILD_TOOLS']], |
Junxiao Shi | 2713a3b | 2015-06-22 16:19:05 -0700 | [diff] [blame] | 12 | headers='../common.hpp boost-test.hpp', |
Yingdi Yu | 77627ab | 2015-07-21 16:13:49 -0700 | [diff] [blame^] | 13 | defines='TMP_TESTS_PATH=\"%s/tmp-tests\"' % bld.bldnode, |
Junxiao Shi | 2713a3b | 2015-06-22 16:19:05 -0700 | [diff] [blame] | 14 | ) |