Subject: Re: [Boost-build] How to control usage requirements propagation?
From: Dmitry.Puzirev (puzirev_at_[hidden])
Date: 2008-12-21 05:23:42
As temporary solution, I made a feature <internal-library>. It works like
<library>, but just stop the feature propagation of <include> and <define>
usage-requirements. That solution also required the modification of
"targets.jam" and "buildin.jam". I still hope to find a solution that does
not require modification of boost.build.
-- Dmitry Phillip Seaver wrote: > > ÐÑÐ·ÑÑÐµÐ² ÐÐ¼Ð¸ÑÑÐ¸Ð¹ 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 > > -- View this message in context: http://www.nabble.com/How-to-control-usage-requirements-propagation--tp21080616p21113890.html Sent from the Boost - Build mailing list archive at Nabble.com.
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