build: allow toggling benchmark/integration/unit tests independently
Change-Id: I88f7816c97a9884f328bf05b6c7e47b2e918ccf0
diff --git a/tests/wscript b/tests/wscript
index 7ab65d1..7277402 100644
--- a/tests/wscript
+++ b/tests/wscript
@@ -3,14 +3,19 @@
top = '..'
def build(bld):
- # common objects that can be shared among all tests
- bld.objects(
- target='tests-common',
- source=bld.path.ant_glob('*.cpp'),
- features='pch',
- headers='tests-pch.hpp',
- use='BOOST_TESTS ndn-cxx')
+ if bld.env.WITH_INTEGRATION_TESTS or bld.env.WITH_UNIT_TESTS:
+ bld.objects(
+ target='tests-common',
+ source=bld.path.ant_glob('*.cpp'),
+ features='pch',
+ headers='tests-pch.hpp',
+ use='BOOST_TESTS ndn-cxx')
- bld.recurse('benchmarks')
- bld.recurse('integration')
- bld.recurse('unit')
+ if bld.env.WITH_BENCHMARKS:
+ bld.recurse('benchmarks')
+
+ if bld.env.WITH_INTEGRATION_TESTS:
+ bld.recurse('integration')
+
+ if bld.env.WITH_UNIT_TESTS:
+ bld.recurse('unit')