Boost logo

Boost-Build :

Subject: Re: [Boost-build] Options for a compiler version
From: Juraj Ivanèiæ (juraj.ivancic_at_[hidden])
Date: 2013-05-17 16:13:54


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.




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