diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/cc/libu/buildfile | 8 | ||||
-rw-r--r-- | tests/cc/libu/testscript | 54 |
2 files changed, 62 insertions, 0 deletions
diff --git a/tests/cc/libu/buildfile b/tests/cc/libu/buildfile new file mode 100644 index 0000000..104a645 --- /dev/null +++ b/tests/cc/libu/buildfile @@ -0,0 +1,8 @@ +# file : tests/cc/libu/buildfile +# copyright : Copyright (c) 2014-2017 Code Synthesis Ltd +# license : MIT; see accompanying LICENSE file + +# Test utility library support. +# + +./: test{testscript} $b diff --git a/tests/cc/libu/testscript b/tests/cc/libu/testscript new file mode 100644 index 0000000..454a443 --- /dev/null +++ b/tests/cc/libu/testscript @@ -0,0 +1,54 @@ +# file : tests/cc/libu/testscript +# copyright : Copyright (c) 2014-2017 Code Synthesis Ltd +# license : MIT; see accompanying LICENSE file + +crosstest = false +test.arguments = config.cxx="$recall($cxx.path)" + +.include ../../common.test + ++cat <<EOI >=build/root.build +cxx.std = latest + +using cxx + +hxx{*}: extension = hxx +cxx{*}: extension = cxx +EOI + +# Common source files that are symlinked in the test directories if used. +# ++cat <<EOI >=foo.hxx + #ifndef LIBFOO_EXPORT + # define LIBFOO_EXPORT + #endif + + LIBFOO_EXPORT void f (); + EOI + ++cat <<EOI >=foo.cxx + void f () {} + EOI + ++cat <<EOI >=driver.cxx + #include <foo.hxx> + int main () {f ();} + EOI + +: members +: +: Test building individual libuX{} members. +: +ln -s ../foo.hxx ../foo.cxx ../driver.cxx ./; +$* update clean <<EOI + cc.poptions += "-I$src_base" + + # {exe liba libs}{foo} + ./: {exe}{foo} + + exe{foo}: cxx{driver} libue{foo} + liba{foo}: libua{foo} + libs{foo}: libus{foo} + + libu{foo}: cxx{foo} + EOI |