Boost logo

Boost-Build :

From: K. Noel Belcourt (kbelco_at_[hidden])
Date: 2007-02-21 16:24:01


On Feb 21, 2007, at 2:18 PM, Phillip Seaver wrote:

> K. Noel Belcourt wrote, on 2/21/2007 3:59 PM:
>> Hi,
>>
>> Does anyone know of a way to specify a different set of <linkflags>
>> to a toolset conditionally? I've tried this example below but it
>> doesn't work. I'd hate to have to touch every toolset.jam file in
>> order to put in logic to handle conditional properties, but I could.
>>
>> using gcc
>> : 3.4.3
>> : $(mpiCC)
>> : <runtime-link>shared:<linkflags>$(gnu-fortran-libraries)
>> <runtime-link>static:<linkflags>$(gnu-static-fortran-libraries)
>> ;
>>
>

> I haven't tried exactly that, but I think you can do something like
> what
> we've done. I put a "project" statement in my Jamroot.jam file that
> sets requirements and default build settings. This might do what
> you want:
>
> project rootproject
> : requirements
> <toolset>gcc,<runtime-link>shared:<linkflags>$(gnu-fortran-libraries)
>
> <toolset>gcc,<runtime-link>static:<linkflags>$(gnu-static-fortran-
> libraries)
> ;
>
> You could also do things based on the OS you were running on (using "[
> modules.peek : OS ]") or which toolsets are set up (using "[
> feature.values <toolset> ]"). Then, you could set a variable to go in
> the requirements section of the project statement so you wouldn't have
> to have all of the toolset requirements on the project statement. You
> could leave off the "<toolset>foo," part, too, if there's only one
> toolset set up. :-) But I digress.

Oh, interesting. Good ideas all. Let me mull this over...

Thanks again Phillip!

-- Noel


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