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 | |
Alexander Afanasyev | 20c85cb | 2018-03-09 17:50:14 -0500 | [diff] [blame] | 8 | tmp_path = 'TMP_TESTS_PATH="%s"' % bld.bldnode.make_node('tmp-files') |
| 9 | bld.program( |
| 10 | target='../unit-tests', |
| 11 | name='unit-tests', |
Shock Jiang | 0f0bc4b | 2015-06-22 15:11:30 -0700 | [diff] [blame] | 12 | source=bld.path.ant_glob(['*.cpp'] + ['%s/**/*.cpp' % tool for tool in bld.env['BUILD_TOOLS']]), |
| 13 | use=['core-objects'] + ['%s-objects' % tool for tool in bld.env['BUILD_TOOLS']], |
Junxiao Shi | 6fd1695 | 2016-07-06 20:52:25 +0000 | [diff] [blame] | 14 | install_path=None, |
Alexander Afanasyev | 20c85cb | 2018-03-09 17:50:14 -0500 | [diff] [blame] | 15 | defines=[tmp_path]) |