Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2003-10-10 07:58:23


abingham2 wrote:

> Thanks for the help on that. I worked with what your example, and I
> was able to get things working. Implementing variant aliases, however,
> brought up another issue.
>
> The alias selection method relies on a property being propagated from
> the main target to the alias. However, that property is also
> propagated to every other dependency of the main target. In my case,
> that's a couple of libraries, all of which get a new build variant
> based on that property.
>
> So, is there any way to limit or localize the propagation of the
> property? In this case, I'd like the property to only affect the alias
> selection, not any of the other dependencies (for which the property
> is essentially meaningless). Thanks.

In the current codebase, there's only one way. You can prevent the property
from being propagated to libraries by using yet another alias.

alias feature-x-sources .....
exe main : main.cpp feature-x-sources libraries ;

alias libraries : lib1 lib2 : <X>off ;

You probably would want to add

explicit lib1 ;
explicit lib2 ;

otherwise, "lib1" will be considered requested two times, from command line
and from "libraries" and will be compiled with two different values of "X".

In fact, I'm not 100% happy with the above solution, so suggestions are
welcome.

- Volodya

 


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