-----Original Message----- From: Boost
On Behalf Of Edward Diener via Boost Sent: 12 February 2020 16:00 To: boost@lists.boost.org Cc: Edward Diener Subject: Re: [boost] If one specifies a cxxstd-dialect, one must also specify the cxxstd On 2/12/2020 5:15 AM, Paul A Bristow via Boost wrote:
-----Original Message----- From: Boost
On Behalf Of Edward Diener via Boost Sent: 11 February 2020 18:32 To: boost@lists.boost.org Cc: Edward Diener Subject: Re: [boost] If one specifies a cxxstd-dialect, one must also specify the cxxstd On 2/11/2020 4:56 AM, Paul A Bristow via Boost wrote:
https://boostorg.github.io/build/manual/develop/index.html#bbv2.over vi ew.builtin s.features
says
5.3. Builtin features
cxxstd Allowed values: 98, 03, 0x, 11, 1y, 14, 1z, 17, 2a, latest.
cxxstd-dialect Allowed values: iso, gnu, ms.
So these work as expected
toolset=gcc cxxstd=2a cxxstd-dialect=gnu is OK toolset=gcc-9.2.0 cxxstd=2a cxxstd-dialect=gnu is OK too
But if I do NOT specify the cxxstd version - just
toolset=gcc cxxstd-dialect=gnu
for example:
boost\libs\multiprecision\example>b2 float128_snips toolset=gcc-8.1.0 cxxstd-dialect=gnu address-model=64 release > .mp_float128_snips_gcc810_14_gnu.log
Iboost/tools/build/src/build\feature.jam:1020: in feature.compress-subproperties from module feature error: assertion failure: [ set.equal "<cxxstd-dialect>gnu" "toolset-gcc:version8.1.0" : "toolset-gcc:version8.1.0" ] error: Expected: [ "true" ] error: Got: [ ]
which had be puzzled for a while.
Probably the even more common case of only having one compiler, say gcc, installed, and so not specifying toolset at all, confusingly behaves the same way?
This is a perfectly reasonable behaviour, but this requirement might helpfully be documented.
Or this more subtle than I understand?
"dialect" is a sub-feature of "cxxstd" in the same way that "version" is a sub-feature of "toolset". If you specify a sub-feature the feature to which it applies must always be specified somewhere.
I did say " perfectly reasonable behaviour" 😉
but if you say toolset=gcc you get a default version, and there isn't a command toolset-version=9.2, so the syntax isn't quite regular (and conveniently cleverer to you can write gcc-9.2.0 ...)
If you say cxxstd=xx you get a default dialect. Are you sure that you can not say toolset=gcc toolset-version=9.2 ? The "gcc-9.2.0" is shorthand for "toolset=gcc- 9.2.0" since Boost Build especially recognizes toolset designations without the need of "toolset=" syntax. You should be able to say "cxxstd=17-gnu" as an example, in order to specify both as feature-subfeature.
Correct!
b2 toolset=gcc cxxstd=17-gnu float128_snips
Neat - but I am not sure how I would have guessed, (without delving into .jam src).
b2 toolset=gcc toolset-version=9.2.0 cxxstd=17 float128_snips fails.
In the end it feels all too clever, mainly to reduce typing. I am not surprised to find that toolset=gcc-gnu doesn't work.
Examples, examples ...
Are very helpful, as I have been bleating for over a decade. Thanks Paul