Boost logo

Boost-Build :

Subject: Re: [Boost-build] How to control usage requirements propagation?
From: Phillip Seaver (phil_at_[hidden])
Date: 2008-12-19 11:39:11


Пузырев Дмитрий wrote:
> Hello, Group.
> Since "Milestone 11 (Jule 20, 2006)" in changes-list
> Usage requirements are propagated not only direct dependents, but
> to indirect dependents
> How can I control this behavior? I need to use library "a" as
> implementation details of library "b" and don't want
> to apply "a" usage-requirements to all dependents of "b". Example:
> lib a : a.c : : : <include>./a ;
> lib b : b.c a : : : <include>./b ;
> exe c : c.c b ;
> "c" will include both directories "a" and "b", but I need to include
> only "b". <use>a, <dependency>a and <library>a in "b" requirements
> will cause the same effect...
> I want to do something like this:
> lib a : a.c : : : <include>./a ;
> lib b : b.c : <internal-use>a : : <include>./b ;
> exe c : c.c b ;
> In order to inform build system, do not propagate "a" usage
> requirements to the dependents of "b"...
> --
> Dmitry
>
> _______________________________________________
> Unsubscribe & other changes:
> http://lists.boost.org/mailman/listinfo.cgi/boost-build

In my version of build/targets.jam at the end of the
"compute-usage-requirements" rule, I have:

        raw = [ property.change $(raw) : <pch-header> ] ;
        raw = [ property.change $(raw) : <pch-file> ] ;
        # don't propagate defines and includes
        raw = [ property.change $(raw) : <define> ] ;
        raw = [ property.change $(raw) : <include> ] ;

The last line changes things so that includes don't go beyond direct
dependents. If you later decide that dependents of "b" need the
includes for "a", you can just add "<use>a" to b's usage requirements part.

I think it used to be in the distribution, but I can't figure out where
or when it got removed (assuming I remember correctly that it was in the
tree at all :-) ).

Phillip


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