Restrictions for naming custom variant

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

Restrictions for naming custom variant

Boost - Build mailing list
Hi;

TL;TR: In Jamfile, can I define custom variant with name that contains dashes?

For example:

variant ubasan-undefined
    : release
    : ...
    ;

In the docs [1], there is naming rule for main target only:

    A main target name may contain alphanumeric characters, dashes
(‘-’), and underscores (‘_’).

I have tried multiple variations of name in Jamfile and name passed as value to
variant= argument, w/ and w/o wrapping in double-quotes, and none worked for me.

If instead I do either of

- declare `variant ubasan~undefined` and pass `variant=variant ubasan~undefined`
- declare `variant ubasan_undefined` and pass `variant=variant ubasan_undefined`

then it works.

[1] https://boostorg.github.io/build/manual/develop/index.htm

Best regards,
--
Mateusz Loskot, http://mateusz.loskot.net
_______________________________________________
Unsubscribe & other changes: https://lists.boost.org/mailman/listinfo.cgi/boost-build
Reply | Threaded
Open this post in threaded view
|

Re: Restrictions for naming custom variant

Boost - Build mailing list
AMDG

On 06/20/2018 01:02 PM, Mateusz Loskot via Boost-build wrote:

> Hi;
>
> TL;TR: In Jamfile, can I define custom variant with name that contains dashes?
>
> For example:
>
> variant ubasan-undefined
>     : release
>     : ...
>     ;
>
> In the docs [1], there is naming rule for main target only:
>
>     A main target name may contain alphanumeric characters, dashes
> (‘-’), and underscores (‘_’).
>

It's here:
https://boostorg.github.io/build/manual/develop/index.html#bbv2.reference.features

"Feature values for non-free features may not contain the ‘<’,
‘:’, or ‘=’ characters"

But this is incorrect because '-' is reserved for
separating subfeatures.

> I have tried multiple variations of name in Jamfile and name passed as value to
> variant= argument, w/ and w/o wrapping in double-quotes, and none worked for me.
>
> If instead I do either of
>
> - declare `variant ubasan~undefined` and pass `variant=variant ubasan~undefined`
> - declare `variant ubasan_undefined` and pass `variant=variant ubasan_undefined`
>
> then it works.
>
> [1] https://boostorg.github.io/build/manual/develop/index.htm
>
> Best regards,
>

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: Restrictions for naming custom variant

Boost - Build mailing list
On 20 June 2018 at 21:18, Steven Watanabe via Boost-build
<[hidden email]> wrote:

> AMDG
>
> On 06/20/2018 01:02 PM, Mateusz Loskot via Boost-build wrote:
>> Hi;
>>
>> TL;TR: In Jamfile, can I define custom variant with name that contains dashes?
>>
>> For example:
>>
>> variant ubasan-undefined
>>     : release
>>     : ...
>>     ;
>>
>> In the docs [1], there is naming rule for main target only:
>>
>>     A main target name may contain alphanumeric characters, dashes
>> (‘-’), and underscores (‘_’).
>>
>
> It's here:
> https://boostorg.github.io/build/manual/develop/index.html#bbv2.reference.features
>
> "Feature values for non-free features may not contain the ‘<’,
> ‘:’, or ‘=’ characters"

I shall not feel silly I couldn't find it ;)

> But this is incorrect because '-' is reserved for separating subfeatures.

Thank you!

Best regards,
--
Mateusz Loskot, http://mateusz.loskot.net
_______________________________________________
Unsubscribe & other changes: https://lists.boost.org/mailman/listinfo.cgi/boost-build