Boost logo

Boost-Build :

From: abingham2 (abingham_at_[hidden])
Date: 2003-10-13 07:49:01


> 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.

I can think of a couple of ways to address this issue, but I worry
that they may be too narrow or don't fit into the overall jam scheme.

One approach would be to be able to limit the propagation of a feature
to the Jamfile in which it's created. So, you might have something
like this:

feature enable-X : off on : propagated local ;

where "local" keeps propagation in the Jamfile.

Another option would be to treat 'alias' more like a macro expansion
than a full target. In this way, propagation wouldn't be necessary to
effect an alias. When an alias is a dependency, it would notionally be
expanded "in place" where it is referenced, somewhat like a #include
in C.

In any case, while these ideas might address the immediate question,
it's not clear to me if they are desireable in a larger sense.

Austin

 


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