Using alias to control a test

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Using alias to control a test

Boost - Build mailing list
I am trying to use the 'alias' rule to decide whether something is
tested or not based on the OS and toolset. So I had:

alias somealias : sometest ;

alias somealias : : <target-os>windows <target-os-windows:toolset>gcc ;

in order to keep 'sometest' from being tested when gcc on Windows was
invoked. Does anybody know why this does not work ?

_______________________________________________
Unsubscribe & other changes: https://lists.boost.org/mailman/listinfo.cgi/boost-build
Reply | Threaded
Open this post in threaded view
|

Re: Using alias to control a test

Boost - Build mailing list
AMDG

On 11/16/2018 08:25 AM, Edward Diener via Boost-build wrote:
> I am trying to use the 'alias' rule to decide whether something is
> tested or not based on the OS and toolset. So I had:
>
> alias somealias : sometest ;
>
> alias somealias : : <target-os>windows <target-os-windows:toolset>gcc ;
>

It's just <toolset>gcc.  toolset isn't a subfeature
of target-os.  (Unfortunately, this is not a detectable
error, because illegal properties are common in target
alternatives and are simply considered not to match.)

Also,
- Target alternatives do not have to be the same kind of target,
  so you can just define a single `alias sometest : : ... ;`
- Or you can use a conditional on the test
  <target-os>windows,<toolset>gcc:<build>no

> in order to keep 'sometest' from being tested when gcc on Windows was
> invoked. Does anybody know why this does not work ?
>
In Christ,
Steven Watanabe
_______________________________________________
Unsubscribe & other changes: https://lists.boost.org/mailman/listinfo.cgi/boost-build
Reply | Threaded
Open this post in threaded view
|

Re: Using alias to control a test

Boost - Build mailing list
On 11/16/2018 11:04 AM, Steven Watanabe via Boost-build wrote:

> AMDG
>
> On 11/16/2018 08:25 AM, Edward Diener via Boost-build wrote:
>> I am trying to use the 'alias' rule to decide whether something is
>> tested or not based on the OS and toolset. So I had:
>>
>> alias somealias : sometest ;
>>
>> alias somealias : : <target-os>windows <target-os-windows:toolset>gcc ;
>>
>
> It's just <toolset>gcc.  toolset isn't a subfeature
> of target-os.  (Unfortunately, this is not a detectable
> error, because illegal properties are common in target
> alternatives and are simply considered not to match.)

Of course. I do not know how I missed that. It works. Thanks !

>
> Also,
> - Target alternatives do not have to be the same kind of target,
>    so you can just define a single `alias sometest : : ... ;`

Ok.

> - Or you can use a conditional on the test
>    <target-os>windows,<toolset>gcc:<build>no

This I already knew.

>
>> in order to keep 'sometest' from being tested when gcc on Windows was
>> invoked. Does anybody know why this does not work ?
>>
> In Christ,
> Steven Watanabe


_______________________________________________
Unsubscribe & other changes: https://lists.boost.org/mailman/listinfo.cgi/boost-build