|
Boost : |
From: Ullrich Koethe (u.koethe_at_[hidden])
Date: 2001-07-18 08:00:40
David Abrahams wrote:
> $BOOST_ROOT/libs/python/build/bin/noncopyable_export/gcc/debug/runtime-link-
> dynamic/shared-linkable-true/noncopyable_export.o
> > is actually only one file, no matter whether I'm looking from Solaris or
> > Linux. Of course, this doesn't work. So the filename should read
> >
> > $BOOST_ROOT/libs/python/build/bin/Solaris2.8/...
> > and
> > $BOOST_ROOT/libs/python/build/bin/Linux.whatever/...
>
> Oh! Well, you can set ALL_LOCATE_TARGET differently for different platforms
> if you like. That sets the root of the target directory tree.
>
I'd rather have an automatic mechanism. Can ALL_LOCATE_TARGET be set
automatically to, say, "Solaris2.6", "Solaris2.8" etc. ?
> >
> > exe myprog : myprog.cpp <lib>mylib
> > : <unittest>mylibtest
> > unittest mylibtest : mylibtest.cpp <lib>mylib
> >
> > The idea is that linking of myprog fails (is aborted) if the unittest
> > mylibtest didn't succeed before. The test is automatically recompiled
> > and re-executed if it's out-of-date relativ to myprog. Can this be
> > generalized enough to be put into boost-base.jam, say?
>
> Absolutely. I will start working on the testing side of things in the next
> couple of days.
Great.
Here is what I'm currently doing in makefiles:
myprog : mylibtest myprog.o
$(LINK) -o myprog myprog.o libmylib.a
mylibtest : libmylib.a mylibtest.o
$(LINK) -o mylibtest mylibtest.o libmylib.a
mylibtest || { rm mylibtest; exit 1; }
The main trick is that the test program is removed after a failure (i.e.
after it returns with non-null exit code). This ensures that tests are
mandatory, but are only run when out-of-date (this is important for a
big test suite). I've verified that this trick works whith Jam as well.
Regards
Ulli
-- ________________________________________________________________ | | | Ullrich Koethe Universität Hamburg / University of Hamburg | | FB Informatik / Dept. of Computer Science | | AB Kognitive Systeme / Cognitive Systems Group | | | | Phone: +49 (0)40 42883-2573 Vogt-Koelln-Str. 30 | | Fax: +49 (0)40 42883-2572 D - 22527 Hamburg | | Email: u.koethe_at_[hidden] Germany | | koethe_at_[hidden] | | WWW: http://kogs-www.informatik.uni-hamburg.de/~koethe/ | |________________________________________________________________|
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk