Boost logo

Boost-Build :

From: David Abrahams (dave_at_[hidden])
Date: 2005-12-03 08:35:35


Phillip Seaver <phil_at_[hidden]> writes:

> Vladimir Prus wrote:
>
>>Sorry for not being very helpful with coding this, but I promise to commit the
>>patch even if <pch*> features are hardcoded here ;-) I'll add new feature
>>attribute if and when we'll have another case where propagation to direct
>>dependents only is desired.
>>
> I've mentioned it before (and there have been past discussions about
> it), but I would like to be able to add a library as a dependency to
> another library without the includes and defines being propagated to
> users of the other library. For example (taken from
> http://article.gmane.org/gmane.comp.lib.boost.build/2352 :-) )
>
> lib a : $(ASrc) : : : <include>./include/a ;
> lib b : $(BSrc) a : : : <include>./include/b ;
> lib c : $(CSrc) b : : : <include>./include/c ;
> exe D : $(DSrc) c ;
>
> I would prefer that ./include/a not be added to the compile lines for c
> and d. It would make the command-lines shorter and avoid incorrect
> header includes. If I wanted to propagate a's requirements from b to c,
> I could just use <use>:
>
> lib b : $(BSrc) a : : : <include>./include/b <use>a ;

It seems like the right place to note that b's headers don't #include
a's headers is in the specification of b. So it should be something
like:

  lib a : $(ASrc) : : : <include>./include/a ;
  lib b : $(BSrc) <nopropagate>a : : : <include>./include/b ;
  lib c : $(CSrc) b : : : <include>./include/c ;
  exe D : $(DSrc) c ;

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.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