From 95239b7c5404965d4f5ef997b5b75bf542a25192 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 25 Jun 2015 13:41:19 +0200 Subject: Part one of dependency injection with auto-generation support --- tests/cli/build/bootstrap.build | 2 -- tests/cli/build/root.build | 3 --- tests/cli/buildfile | 6 ------ tests/cli/driver.cpp | 4 ---- tests/cli/lib/libtest/build/bootstrap.build | 2 ++ tests/cli/lib/libtest/build/export.build | 6 ++++++ tests/cli/lib/libtest/build/root.build | 7 +++++++ tests/cli/lib/libtest/buildfile | 2 ++ tests/cli/lib/libtest/test/buildfile | 13 +++++++++++++ tests/cli/lib/libtest/test/extra/test.cli | 11 +++++++++++ tests/cli/lib/libtest/test/test.cli | 8 ++++++++ tests/cli/lib/libtest/test/utility.cpp | 6 ++++++ tests/cli/lib/test/build/bootstrap.build | 2 ++ tests/cli/lib/test/build/root.build | 7 +++++++ tests/cli/lib/test/buildfile | 6 ++++++ tests/cli/lib/test/driver.C | 8 ++++++++ tests/cli/lib/test/test.cli | 5 +++++ tests/cli/simple/build/bootstrap.build | 2 ++ tests/cli/simple/build/root.build | 3 +++ tests/cli/simple/buildfile | 8 ++++++++ tests/cli/simple/driver.cpp | 6 ++++++ tests/cli/simple/test.cli | 5 +++++ tests/cli/test.cli | 5 ----- 23 files changed, 107 insertions(+), 20 deletions(-) delete mode 100644 tests/cli/build/bootstrap.build delete mode 100644 tests/cli/build/root.build delete mode 100644 tests/cli/buildfile delete mode 100644 tests/cli/driver.cpp create mode 100644 tests/cli/lib/libtest/build/bootstrap.build create mode 100644 tests/cli/lib/libtest/build/export.build create mode 100644 tests/cli/lib/libtest/build/root.build create mode 100644 tests/cli/lib/libtest/buildfile create mode 100644 tests/cli/lib/libtest/test/buildfile create mode 100644 tests/cli/lib/libtest/test/extra/test.cli create mode 100644 tests/cli/lib/libtest/test/test.cli create mode 100644 tests/cli/lib/libtest/test/utility.cpp create mode 100644 tests/cli/lib/test/build/bootstrap.build create mode 100644 tests/cli/lib/test/build/root.build create mode 100644 tests/cli/lib/test/buildfile create mode 100644 tests/cli/lib/test/driver.C create mode 100644 tests/cli/lib/test/test.cli create mode 100644 tests/cli/simple/build/bootstrap.build create mode 100644 tests/cli/simple/build/root.build create mode 100644 tests/cli/simple/buildfile create mode 100644 tests/cli/simple/driver.cpp create mode 100644 tests/cli/simple/test.cli delete mode 100644 tests/cli/test.cli (limited to 'tests') diff --git a/tests/cli/build/bootstrap.build b/tests/cli/build/bootstrap.build deleted file mode 100644 index 9e91c9a..0000000 --- a/tests/cli/build/bootstrap.build +++ /dev/null @@ -1,2 +0,0 @@ -project = cli-test -using config diff --git a/tests/cli/build/root.build b/tests/cli/build/root.build deleted file mode 100644 index 8e910cf..0000000 --- a/tests/cli/build/root.build +++ /dev/null @@ -1,3 +0,0 @@ -using cxx -using cli - diff --git a/tests/cli/buildfile b/tests/cli/buildfile deleted file mode 100644 index d71a677..0000000 --- a/tests/cli/buildfile +++ /dev/null @@ -1,6 +0,0 @@ -hxx.ext = -cxx.ext = cpp -ixx.ext = ipp - -exe{driver}: cxx{driver test} -cxx{test}: cli{test} diff --git a/tests/cli/driver.cpp b/tests/cli/driver.cpp deleted file mode 100644 index 70b4146..0000000 --- a/tests/cli/driver.cpp +++ /dev/null @@ -1,4 +0,0 @@ -int -main () -{ -} diff --git a/tests/cli/lib/libtest/build/bootstrap.build b/tests/cli/lib/libtest/build/bootstrap.build new file mode 100644 index 0000000..67a5f1a --- /dev/null +++ b/tests/cli/lib/libtest/build/bootstrap.build @@ -0,0 +1,2 @@ +project = cli-lib-libtest +using config diff --git a/tests/cli/lib/libtest/build/export.build b/tests/cli/lib/libtest/build/export.build new file mode 100644 index 0000000..e8b12b3 --- /dev/null +++ b/tests/cli/lib/libtest/build/export.build @@ -0,0 +1,6 @@ +$out_root/: +{ + include test/ +} + +export $out_root/test/lib{test} diff --git a/tests/cli/lib/libtest/build/root.build b/tests/cli/lib/libtest/build/root.build new file mode 100644 index 0000000..f2f5ca6 --- /dev/null +++ b/tests/cli/lib/libtest/build/root.build @@ -0,0 +1,7 @@ +using cxx + +hxx.ext = +ixx.ext = ipp +cxx.ext = cpp + +using cli diff --git a/tests/cli/lib/libtest/buildfile b/tests/cli/lib/libtest/buildfile new file mode 100644 index 0000000..d00a137 --- /dev/null +++ b/tests/cli/lib/libtest/buildfile @@ -0,0 +1,2 @@ +.: test/ +include test/ diff --git a/tests/cli/lib/libtest/test/buildfile b/tests/cli/lib/libtest/test/buildfile new file mode 100644 index 0000000..5325f14 --- /dev/null +++ b/tests/cli/lib/libtest/test/buildfile @@ -0,0 +1,13 @@ +lib{test}: cxx{utility} cxx{test} extra/cxx{test} +cxx{test} hxx{test}: cli{test} + +extra/: +{ + cxx{test} hxx{test}: cli{test} + cli.options += --cli-namespace test::extra::cli +} + +cxx.poptions += -I$out_root -I$src_root +lib{test}: cxx.export.poptions = -I$out_root -I$src_root + +cli.options += --cli-namespace test::cli diff --git a/tests/cli/lib/libtest/test/extra/test.cli b/tests/cli/lib/libtest/test/extra/test.cli new file mode 100644 index 0000000..8408402 --- /dev/null +++ b/tests/cli/lib/libtest/test/extra/test.cli @@ -0,0 +1,11 @@ +namespace test +{ + namespace extra + { + class options + { + bool --help; + bool --version; + }; + } +} diff --git a/tests/cli/lib/libtest/test/test.cli b/tests/cli/lib/libtest/test/test.cli new file mode 100644 index 0000000..8bc51e8 --- /dev/null +++ b/tests/cli/lib/libtest/test/test.cli @@ -0,0 +1,8 @@ +namespace test +{ + class options + { + bool --help; + bool --version; + }; +} diff --git a/tests/cli/lib/libtest/test/utility.cpp b/tests/cli/lib/libtest/test/utility.cpp new file mode 100644 index 0000000..7c59218 --- /dev/null +++ b/tests/cli/lib/libtest/test/utility.cpp @@ -0,0 +1,6 @@ +#include + +void +f () +{ +} diff --git a/tests/cli/lib/test/build/bootstrap.build b/tests/cli/lib/test/build/bootstrap.build new file mode 100644 index 0000000..e83e189 --- /dev/null +++ b/tests/cli/lib/test/build/bootstrap.build @@ -0,0 +1,2 @@ +project = cli-lib-test +using config diff --git a/tests/cli/lib/test/build/root.build b/tests/cli/lib/test/build/root.build new file mode 100644 index 0000000..2dda614 --- /dev/null +++ b/tests/cli/lib/test/build/root.build @@ -0,0 +1,7 @@ +using cxx + +hxx.ext = h +ixx.ext = inl +cxx.ext = C + +using cli diff --git a/tests/cli/lib/test/buildfile b/tests/cli/lib/test/buildfile new file mode 100644 index 0000000..fc0e552 --- /dev/null +++ b/tests/cli/lib/test/buildfile @@ -0,0 +1,6 @@ +import libs += cli-lib-libtest + +exe{driver}: cxx{driver} cxx{test} $libs +cxx{test} hxx{test}: cli{test} + +cxx.poptions = -I$out_root diff --git a/tests/cli/lib/test/driver.C b/tests/cli/lib/test/driver.C new file mode 100644 index 0000000..ee2171f --- /dev/null +++ b/tests/cli/lib/test/driver.C @@ -0,0 +1,8 @@ +#include "test.h" +#include +#include + +int +main () +{ +} diff --git a/tests/cli/lib/test/test.cli b/tests/cli/lib/test/test.cli new file mode 100644 index 0000000..db3cfb8 --- /dev/null +++ b/tests/cli/lib/test/test.cli @@ -0,0 +1,5 @@ +class options +{ + bool --help; + bool --version; +}; diff --git a/tests/cli/simple/build/bootstrap.build b/tests/cli/simple/build/bootstrap.build new file mode 100644 index 0000000..e2fd93f --- /dev/null +++ b/tests/cli/simple/build/bootstrap.build @@ -0,0 +1,2 @@ +project = cli-simple +using config diff --git a/tests/cli/simple/build/root.build b/tests/cli/simple/build/root.build new file mode 100644 index 0000000..8e910cf --- /dev/null +++ b/tests/cli/simple/build/root.build @@ -0,0 +1,3 @@ +using cxx +using cli + diff --git a/tests/cli/simple/buildfile b/tests/cli/simple/buildfile new file mode 100644 index 0000000..5a940ce --- /dev/null +++ b/tests/cli/simple/buildfile @@ -0,0 +1,8 @@ +hxx.ext = +cxx.ext = cpp +ixx.ext = ipp + +cxx.poptions = -I$out_root + +exe{driver}: cxx{driver} cxx{test} +cxx{test} hxx{test}: cli{test} diff --git a/tests/cli/simple/driver.cpp b/tests/cli/simple/driver.cpp new file mode 100644 index 0000000..ef9cc60 --- /dev/null +++ b/tests/cli/simple/driver.cpp @@ -0,0 +1,6 @@ +#include "test" + +int +main () +{ +} diff --git a/tests/cli/simple/test.cli b/tests/cli/simple/test.cli new file mode 100644 index 0000000..db3cfb8 --- /dev/null +++ b/tests/cli/simple/test.cli @@ -0,0 +1,5 @@ +class options +{ + bool --help; + bool --version; +}; diff --git a/tests/cli/test.cli b/tests/cli/test.cli deleted file mode 100644 index db3cfb8..0000000 --- a/tests/cli/test.cli +++ /dev/null @@ -1,5 +0,0 @@ -class options -{ - bool --help; - bool --version; -}; -- cgit v1.1