Boost logo

Boost-Build :

From: Markus Schöpflin (markus.schoepflin_at_[hidden])
Date: 2006-01-13 07:00:01


Vladimir Prus wrote:

> On Friday 13 January 2006 13:19, Markus Schöpflin wrote:
>
>> Some things which come to my mind:
>>
>> 1. Quite a number of test jam files contain workarounds for specific
>> compilers or platforms. Most look something like this (just as an example):
>>
>> local rule special-requirements ( toolset variant : properties * )
>> {
>> if $(UNIX) && $(OS) = OSF
>> {
>> switch $(toolset)
>> {
>> case gcc* : properties += <cflags>-mfp-rounding-mode=d ;
>> case tru64cxx* : properties += <cflags>-fprm <cflags>d ;
>> }
>> }
>>
>> return $(properties) ;
>> }
>>
>> local rule local-run ( sources + : args * : input-files * : requirements *
>>
>> : name ? : default-build * : args2 * )
>>
>> {
>> return [ run $(sources) : $(args) : $(input-files)
>>
>> : $(requirements) special-requirements
>> : $(name) : $(default-build) : $(args2) ] ;
>>
>> }
>>
>> How does the corresponding V2 code look like?
>
> In the simplest form:
>
> return [ run .....
> : $(requirements) <os>OSF,<toolset>gcc>:<cflags>-mfp-rounding=mode=d
> ....
>
> That's provided that <os>OSF is property set on that OS, and if not that can
> be fixed.

Can this do pattern matching as well? Because this is why local rules are
used in the first place. The actual tool set name will be something like
gcc-4.0.2-osf, or tru64cxx65-042, or something similar.

>> 2. I use customized tool sets for all of my regression runs. For V1, one
>> such file looks like this:
>>
>> {
>> extends-toolset tru64cxx65 ;
>>
>> flags tru64cxx65 CFLAGS : -version V6.5-042 -ieee ;
>> flags tru64cxx65 LINKFLAGS : -version V6.5-042 -ieee ;
>> }
>>
>> How will these customized tool sets work under V2?
>
> Something like:
>
> using tru64cxx65 : : <cflags>"-version V6.5-042 -ieee" ;

Sounds easy.

[snip]

Markus


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