Boost logo

Boost-Build :

From: Ali Azarbayejani (ali_at_[hidden])
Date: 2003-03-27 14:22:48


Vladimir Prus wrote:

(from the build specification)
> 3. as a <library> property in usage requirements
> - no effect on 'a' itself. However, all target
> which use 'a' will get <library>b in their
> build properties. Usage requirements from 'b'
> will be also added, recursively. This is the same
> for both exe and lib, except that you won't likely
> to use 'exe' in some other target.

(from the last set of questions about usage requirements)
> Ali Azarbayejani wrote:
> > <2> Does "uses" also include INDIRECT relationships? That is, if A
> > "uses" B and B "uses" C, does A "uses" C? Or not?
> >
> > Does this vary depending on the feature-type (yuck!)?
> > E.g. <library/link-to> applies to INDIRECT dependents but
> > <include> applies only to DIRECT dependents?
> No. Usage requirements from sources and "dependency" features are not
> propagated further. Usage requirements from "dependency" features in usage
> requirements are propagated. E.g.
> lib a : a.cpp : <uses>b : : <library>c ;
> Here, usage requirements of 'c' will be present if 'a's usage requirements.
> Usage requirements of 'b' will affect build properties of 'a' and nothing
> else.

> I'm not sure I see the problem, yet. Yes, requirements are processed before
> generating dependency main target and adding usage requirements, and
> usage requirements in dependencies are not 100% equal to requirements,
> but it still looks sensible to me. Can you elaborate?

I remain confused by your answers. On the one hand, you say that usage
requirements are propagated "recursively", and on the other hand you say
they don't affect indirect dependents. These can't both be true.

Try the following quiz.

Example 1:

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

Does D get compiled with "-I./include/c"?

Does D get compiled with "-I./include/b"?

Does D get compiled with "-I./include/a"?

Example 2:

lib a : $(ASrc) ;
lib b : $(BSrc) a : : : <library>a ;
lib c : $(CSrc) b : : : <library>b ;
exe D : $(DSrc) c ;

Does D link to c?

Does D link to b?

Does D link to a?


Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at