blob: 19bb8e752748acdf6ba089d17c13bb0c4daa1bbf [file] [log] [blame]
Junxiao Shi2713a3b2015-06-22 16:19:05 -07001# -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
2top = '..'
3
4def build(bld):
Davide Pesaventoae37cf32019-02-20 18:19:22 -05005 if not bld.env.WITH_TESTS:
Junxiao Shi2713a3b2015-06-22 16:19:05 -07006 return
7
Davide Pesavento66777622020-10-09 18:46:03 -04008 tmpdir = 'UNIT_TESTS_TMPDIR="%s"' % bld.bldnode.make_node('tmp-files')
Alexander Afanasyev20c85cb2018-03-09 17:50:14 -05009 bld.program(
10 target='../unit-tests',
11 name='unit-tests',
Davide Pesaventoae37cf32019-02-20 18:19:22 -050012 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],
Davide Pesavento66777622020-10-09 18:46:03 -040014 defines=[tmpdir],
Davide Pesaventoae37cf32019-02-20 18:19:22 -050015 install_path=None)