build: Reviving support for precompiled headers
This commit also includes an update of ./waf, which has several
improvements. In particular, clang++ is now default compiler on OSX
platform.
This commit also includes reorganization of tests. All unit tests are
now under tests/unit-tests and integrated tests are under
tests/integrated. This change allows small compilation optimization,
partially related to precompiled headers.
Change-Id: I4c171c04d18e9cb83e461264a35b9ed85ea4d50e
diff --git a/tests/integrated/wscript b/tests/integrated/wscript
new file mode 100644
index 0000000..d5d9af7
--- /dev/null
+++ b/tests/integrated/wscript
@@ -0,0 +1,29 @@
+# -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
+
+from waflib import Utils
+
+top = '..'
+
+def build(bld):
+ unittests = bld(
+ target="integrated-test-objects",
+ name="integrated-test-objects",
+ features="cxx",
+ source=bld.path.ant_glob(['**/*.cpp'],
+ excl=['main.cpp', '**/*-osx.cpp', '**/*-sqlite3.cpp']),
+ use='tests-base',
+ includes='.',
+ install_path=None,
+ )
+
+ if bld.env['HAVE_OSX_SECURITY']:
+ unittests.source += bld.path.ant_glob('**/*-osx.cpp')
+
+ # In case we want to make it optional later
+ unittests.source += bld.path.ant_glob('**/*-sqlite3.cpp')
+
+ bld.program(
+ target="../integrated-tests",
+ use="integrated-test-objects",
+ source="main.cpp",
+ install_path=None)