Boost logo

Boost :

From: pbristow_at_[hidden]
Date: 2020-02-12 10:15:33


> -----Original Message-----
> From: Boost <boost-bounces_at_[hidden]> On Behalf Of Edward Diener via
> Boost
> Sent: 11 February 2020 18:32
> To: boost_at_[hidden]
> Cc: Edward Diener <eldiener_at_[hidden]>
> 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.overvi
> > 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:version>8.1.0" : "<toolset-gcc:version>8.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 ...)

Examples, examples ...?

Paul
 


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk