From: Phillip Seaver (phil_at_[hidden])
Date: 2007-02-21 16:18:18
K. Noel Belcourt wrote, on 2/21/2007 3:59 PM:
> 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)
> Our gcc builds need to link different sets of libraries based on
> whether we're linking a static or shared runtime.
> Any ideas if / how this could be done or do I need to touch each
> toolset to parse out the conditional properties manually?
> -- Noel
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:
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.
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