|
Boost Users : |
Subject: Re: [Boost-users] [boost] [bjam] combinations of options
From: Lorenzo Caminiti (lorcaminiti_at_[hidden])
Date: 2016-09-07 21:00:10
On Tue, Aug 30, 2016 at 8:26 AM, Steven Watanabe <watanabesj_at_[hidden]> wrote:
Hello Steven,
> On 08/29/2016 09:31 AM, Lorenzo Caminiti wrote:
>>
>> When I use bjam the following will compile my code with combinations
>> of MSVC, GCC, and CLang for both shared and static linking:
>>
>> $ bjam toolset=msvc,gcc,clang link=shared,static # (1)
>>
>> Is there a way to define a variant, target, or something else in the
>> Jamfiles so that I can shortcut the above by typing just the variant
>> target at the command line:
>>
>> $ bjam all_toolset_link_combinations # equivalent to (1) above
>>
>> I am asking this just for convenience because I have a feature like
>> toolset but with 30+ values so it'd be nice to shortcut it to a single
>> target on the bjam command line.
>
> 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'
If I try instead:
alias all_x : : <x>a <x>b <x>c ;
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?
Thank you.
--Lorenzo
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