Boost logo

Boost-Build :

Subject: Re: [Boost-build] Options for a compiler version
From: Edward Diener (eldiener_at_[hidden])
Date: 2013-05-17 18:55:42


On 5/17/2013 4:13 PM, Juraj Ivančić wrote:
> On 17.5.2013. 13:27, Edward Diener wrote:
>> For a given compiler major version number, or for a given compiler major
>> version number and minor version number, I would like to:
>>
>> 1) set a compiler option in a test or in an alias
>> 2) not run a test or an alias
>> 3) set a project option
>>
>> How does one do that with Boost Build ?
>>
>> For a given compiler major version number on up ( or on down ), or for a
>> given compiler major version number and minor version number on up ( or
>> on down ), I would like to:
>>
>> 1) set a compiler option in a test or in an alias
>> 2) not run a test or an alias
>> 3) set a project option
>>
>> A single practical example ( among many ) :
>>
>> For gcc greater or equal than 4.3 I need to set the -std=c++0x option
>> for a test.
>
> For such complex conditions you need to use <conditional> feature. I
> attached an example which demonstrates gcc-4.3/std=c++0x problem. It
> only deals with major version numbers, but should get you started.
>
> Hope this helps.

Thanks, I will look at it.

The condition, which you say is "complex", appears to me as an end-user
of a build system to be extraordinarily simple. I just do not understand
why Boost Build cannot support natively such a scenario. The scenario
itself is so common as to be almost ridiculous. Yet it is difficult to
do without knowledge of the bjam language and the workings of Boost
Build. I do not think that should be the case.


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk