Boost logo

Boost-Build :

Subject: Re: [Boost-build] Target alternatives and multiple compilers - again
From: Edward Diener (eldiener_at_[hidden])
Date: 2011-07-12 11:54:58


On 7/12/2011 6:18 AM, Jürgen Hunold wrote:
> Hi Edward,
>
> On Monday, 11. July 2011 18:49:29 Edward Diener wrote:
>> Ping !
>
> Pong ;-))
>
>> I need to use target alternatives with multiple compilers so I write, as
>> part of my jamfile:
>>
>> test-suite somelib
>>
>> [ compile some_source.cpp ]
>> ;
>>
>> test-suite somelib_gcc
>>
>> [ compile some_source.cpp
>>
>> :<cxxflags>-std=c++0x
>> : some_source_gcc
>>
>> ]
>>
>> <toolset>gcc-4.3.0
>> <toolset>gcc-4.4.0
>> <toolset>gcc-4.5.0
>> <toolset>gcc-4.5.2
>> <toolset>gcc-4.6.0
>
> This won't work.
>
> You have to use:
>
> <toolset-gcc:version>4.3.0

That does not work either. If I change the above to:

test-suite somelib
    :
          [ compile some_source.cpp ]
    ;

test-suite somelib_gcc
    :
         [ compile some_source.cpp
           : <cxxflags>-std=c++0x
           : some_source_gcc
         ]
    :
    <toolset-gcc:version>4.3.0
    <toolset-gcc:version>4.4.0
    <toolset-gcc:version>4.5.0
    <toolset-gcc:version>4.5.2
    <toolset-gcc:version>4.6.0
    ;

test-suite somelib_gcc ;

change some_source.cpp, and execute the jamfile for gcc-4.6.0,
some_source_gcc never gets created even though some_source does.

>
> to get this working.
>
> A more stable solution would be to query the compile in a conditional rule.

I simply want to have a target alternative for multiple compilers.
Surely this can not need some rule-based programming.


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