Alexander Afanasyev | a1ae0a1 | 2014-01-28 15:21:02 -0800 | [diff] [blame] | 1 | # -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- |
| 2 | |
Alexander Afanasyev | 31ae15f | 2014-01-29 20:58:00 -0800 | [diff] [blame] | 3 | from waflib import Utils |
| 4 | |
Alexander Afanasyev | a1ae0a1 | 2014-01-28 15:21:02 -0800 | [diff] [blame] | 5 | top = '..' |
| 6 | |
| 7 | def build(bld): |
Alexander Afanasyev | 8b1674a | 2014-05-15 00:58:43 -0700 | [diff] [blame^] | 8 | bld(features=['cxx', 'pch'], |
| 9 | name='tests-base', |
| 10 | target='tests-base', |
| 11 | headers=['../src/common-pch.hpp', 'boost-test.hpp'], |
Alexander Afanasyev | 766cea7 | 2014-04-24 19:16:42 -0700 | [diff] [blame] | 12 | use='ndn-cxx', |
Alexander Afanasyev | b1db7c6 | 2014-04-03 14:57:25 -0700 | [diff] [blame] | 13 | includes='.', |
Alexander Afanasyev | 8b1674a | 2014-05-15 00:58:43 -0700 | [diff] [blame^] | 14 | ) |
| 15 | |
| 16 | unit_tests = bld( |
| 17 | target="unit-test-objects", |
| 18 | name="unit-test-objects", |
| 19 | features="cxx", |
| 20 | source=bld.path.ant_glob(['unit-tests/**/*.cpp'], |
| 21 | excl=['**/*-osx.cpp', '**/*-sqlite3.cpp']), |
| 22 | use='tests-base', |
| 23 | includes='.', |
| 24 | install_path=None, |
| 25 | ) |
| 26 | |
| 27 | integrated = bld( |
| 28 | target="integrated-test-objects", |
| 29 | name="integrated-test-objects", |
| 30 | features="cxx", |
| 31 | source=bld.path.ant_glob(['integrated/**/*.cpp'], |
| 32 | excl=['**/*-osx.cpp', '**/*-sqlite3.cpp']), |
| 33 | use='tests-base', |
| 34 | includes='.', |
Alexander Afanasyev | 5e1288e | 2014-03-28 11:11:48 -0700 | [diff] [blame] | 35 | install_path=None, |
Alexander Afanasyev | d409d59 | 2014-01-28 18:36:38 -0800 | [diff] [blame] | 36 | ) |
Alexander Afanasyev | 31ae15f | 2014-01-29 20:58:00 -0800 | [diff] [blame] | 37 | |
Alexander Afanasyev | 59d67a5 | 2014-04-03 16:09:31 -0700 | [diff] [blame] | 38 | if bld.env['HAVE_OSX_SECURITY']: |
Alexander Afanasyev | 8b1674a | 2014-05-15 00:58:43 -0700 | [diff] [blame^] | 39 | unit_tests.source += bld.path.ant_glob('unit-tests/**/*-osx.cpp') |
| 40 | integrated.source += bld.path.ant_glob('integrated/**/*-osx.cpp') |
Alexander Afanasyev | 31ae15f | 2014-01-29 20:58:00 -0800 | [diff] [blame] | 41 | |
| 42 | # In case we want to make it optional later |
Alexander Afanasyev | 8b1674a | 2014-05-15 00:58:43 -0700 | [diff] [blame^] | 43 | unit_tests.source += bld.path.ant_glob('unit-tests/**/*-sqlite3.cpp') |
| 44 | integrated.source += bld.path.ant_glob('integrated/**/*-sqlite3.cpp') |
Alexander Afanasyev | e2dcdfd | 2014-02-07 15:53:28 -0800 | [diff] [blame] | 45 | |
Alexander Afanasyev | 8b1674a | 2014-05-15 00:58:43 -0700 | [diff] [blame^] | 46 | unit_test_main = bld( |
| 47 | target='unit-tests-main', |
| 48 | name='unit-tests-main', |
| 49 | features='cxx', |
| 50 | source=bld.path.ant_glob(['*.cpp']), |
| 51 | use='ndn-cxx', |
| 52 | ) |
| 53 | |
| 54 | bld(features="cxx cxxprogram", |
| 55 | target="../unit-tests", |
| 56 | use="unit-test-objects unit-tests-main", |
| 57 | install_path=None) |
| 58 | |
| 59 | bld(features="cxx cxxprogram", |
| 60 | target="../integrated-tests", |
| 61 | use="integrated-test-objects unit-tests-main", |
| 62 | install_path=None) |