blob: bc7ce0f47e57ca0c8f3a4a9d29d60747467f224c [file] [log] [blame]
Davide Pesavento7e780642018-11-24 15:51:34 -05001# -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
2
3top = '../..'
4
5def build(bld):
6 configPath = 'UNIT_TEST_CONFIG_PATH="%s"' % bld.bldnode.make_node('tmp-files')
7
8 # unit test objects
9 srcFiles = bld.path.ant_glob('**/*.cpp', excl=['main.cpp',
10 '**/*-osx.t.cpp',
11 '**/*-sqlite3.t.cpp'])
12
13 if bld.env['HAVE_OSX_FRAMEWORKS']:
14 srcFiles += bld.path.ant_glob('**/*-osx.t.cpp')
15
16 # In case we want to make it optional later
17 srcFiles += bld.path.ant_glob('**/*-sqlite3.t.cpp')
18
19 bld.objects(target='unit-tests-objects',
20 source=srcFiles,
21 use='tests-common',
22 defines=[configPath])
23
24 # unit test binary
25 bld.program(target='../../unit-tests',
26 name='unit-tests',
27 source=['main.cpp'],
28 use='unit-tests-objects',
29 install_path=None)