Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2007-10-16 12:25:07


On Tuesday 16 October 2007 18:32:27 Franz wrote:
> Hello
>
> I use boost.build to build Code for VxWorks, therefore I created a toolset which
> inherits from the gcc toolset. This works fine. Now I have to also support a
> newer version of VxWorks and I would like to do this with the version support of
> the toolset. My Problem is now that its not enough to change some variables for
> the actions but I need completely different actions for compiling and linking
> but I couldn't figure out how I would define different actions for different
> toolset versions.
>
> I would like to do something like this:
>
> # vxworks.jam
> ...
> actions link.v5 bind LIBRARIES # linking with version 5
> {
> A B C;
> }
>
> actions link.v6 bind LIBRARIES # linking with version 6
> {
> X Y Z;
> }

First, your toolset should have a 'version' subfeature that
can be set in 'using'. Please see how gcc handles that,
using common.check-init-parameters.

Then, write a rule that will redirect, like this:

        rule link ( targets * : sources * : properties * )
        {
                if <toolset-vxworks:version>XXX in $(properties)
                {
                        link.v5 $(targets) : $(sources) : $(properties) ;
                }
                ...........
        }

HTH,
Volodya


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