From: Vladimir Prus (ghost_at_[hidden])
Date: 2004-11-09 03:28:06
On Saturday 06 November 2004 22:31, jeffbenshetler wrote:
> Libraries (lib) do not appear to be inherited from parent Jamfiles.
> Two questions:
> 1) How do I declare libraries in a parent Jamfile and make them
> visible in subprojects?
It's not possible at the moment. There's another solution. If your top-level
Jamfile declares a project name, you can use it to refer to targets:
project um ;
lib foobar : ..... ;
exe foo : foo.cpp /um//foobar ;
> 2) What's the best way to refer to the boost libraries, when only the
> results of "install" are visible? Is this reasonable?
> # in um/src/Jambase
> project libum :
> requirements thread_lib # argument error
> <lib>thread_lib # argument error
You can use
project libum : requirements <library>/um//thread_lib ;
> The library declarations work if they are in each Jambase (changing
> the relative paths, of course). But the library declarations are not
> visible to subprojects. My understanding is that subprojects read and
> process superprojects (Jambase) up to the directory containing
Yes, the parent Jamfiles are read before reading each Jamfile. But it's not
like textual inclusion, so declarations in parent Jamfiles are not visible.
> I know this is not the best way to bring in libraries, but haven't
> been able to figure out a better way.
In fact, when using already-built boost, this is the only way. Boost.Build
cannot read a directory and create a set of library declarations
automatically. At least yet.
It might be more convenient to let Boost.Build build boost too. Say, after
using /boost/threads : ......../boost/libs/threads/build ;
you'll be able to do:
exe t : t.cpp /boost/threads//boost_threads ;
> We have put in more than a week
> of manual and example reading. For one thing, our development tree is
> NOT underneath the Boost tree. I've tried
> SEARCH threads.jam = $(BOOST_PATH) ;
I'm not sure what are you trying to do.
> and also
> project um : requirements <search>@boost/lib
I think <search> has no effect except for library declaration.
Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk