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): |
Davide Pesavento | ae37cf3 | 2019-02-20 18:19:22 -0500 | [diff] [blame^] | 5 | if not bld.env.WITH_TESTS: |
Junxiao Shi | 2713a3b | 2015-06-22 16:19:05 -0700 | [diff] [blame] | 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', |
Davide Pesavento | ae37cf3 | 2019-02-20 18:19:22 -0500 | [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], |
| 14 | defines=[tmp_path], |
| 15 | install_path=None) |