From: Vladimir Prus (ghost_at_[hidden])
Date: 2004-12-16 03:58:41
> I have a problem with the propagation of usage-requirements:
> My Jamfile looks like this:
> alias foo_dependencies : /user-config/some_external_lib ;
> lib libfoo : foo.cpp foo_dependencies ;
> exe bar : bar.cpp libfoo ;
> and my user-config.jam looks like
> alias some_external_lib : : : <include>some_dir ;
> No I would expect that if I build 'bar', the 'some_dir' include
> directory is also passed on to the compiler. This is necessary because
> bar depends on foo and foo includes headers of the external library.
> However only the 'some_dir' is searched for include files when compiling
> foo.cpp but while compiling bar.cpp ;-(
This is by design. In general, we don't know if 'libfoo' public headers
include headers from some_external_lib. If they do, we need to propagate
usage requirements. If they don't, we don't need.
You can achieve the desired effect by:
lib libfoo : foo.cpp foo_dependencies : : : <use>foo_dependencies ;
OTOH, I can't see any case where propagating usage requirements all the way up
will hurt, so maybe it's time to revise the behaviour. Opinions?
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