Boost logo

Boost Users :

Subject: Re: [Boost-users] [boost] [bjam] combinations of options
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2016-09-11 23:43:13


AMDG

On 09/07/2016 07:00 PM, Lorenzo Caminiti wrote:
> On Tue, Aug 30, 2016 at 8:26 AM, Steven Watanabe <watanabesj_at_[hidden]> wrote:
>
>> <snip>
>> Use an alias target with the default-build
>> set to your combination. (This is how
>> --build-type=complete at the root used to be
>> implemented.)
>
> I was not able to use alias here... let me show what I tried.
>
> In my Jamfile I have a feature defined more or less like this:
>
> feature.feature x : a b c : composite propagated link-incompatible ;
> feature.compose <x>a : <define>MACRO_A ;
> feature.compose <x>b : <define>MACRO_B ;
> feature.compose <x>c : <define>MACRO_C ;
>
> So the following will build with feature x equal a, b, and then c:
>
> $ bjam x=a,b,c
>
> Now, I'd like to shortcut the above to just one target named "all_x":
>
> $ bjam all_x
>
> If I try to do that in the Jamfile using:
>
> alias all_x : a b c ;
>
> I get these errors:
>
> error: Unable to find file or target named
> error: 'a'
>

The second argument should be a list of targets.
a, b, and, c are not targets, they're the
values of a feature.

> If I try instead:
>
> alias all_x : : <x>a <x>b <x>c ;
>

The third argument is the requirements.
What you need to use is the fourth
argument, default-build.

> I also get errors:
>
> error: explicitly-specified values of non-free feature <x> conflict
> error: existing values: a b c
> error: value from expanding <x>b : b
>
> Can such an "all_x" target be defined using alias or some other BJam construct?
>

The correct way is:
alias all_x : [list of targets to build] : : <x>a <x>b <x>c ;

In Christ,
Steven Watanabe


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net