|
Boost-Build : |
Subject: Re: [Boost-build] how to vary the destination directory based on <toolset> in stage rule
From: Vladimir Prus (ghost_at_[hidden])
Date: 2009-04-22 13:44:38
On Wednesday 22 April 2009 21:35:35 Stjepan Rajko wrote:
> Hello,
>
> I tried using a Jamfile with the following excerpt:
>
> lib ofxGesture
> : $(SOURCES).cpp
> : <link>static
> ;
>
> stage osx
> : ofxGesture
> : <toolset>darwin
> ;
>
> stage linux
> : ofxGesture
> : <toolset>gcc
> ;
>
> stage win
> : ofxGesture
> : <toolset>msvc
> ;
>
> The intent was to have the destination directory depend on the
> <toolset> (with only one of those stage commands executing on any of
> the three toolsets), but now I realize that there are all sorts of
> reasons why that's not what happens.
>
> Could someone suggest a correct way to vary the destination directory
> based on the <toolset>?
Yes, use <location> together with indirect conditinal requirements:
stage whatever :
: ofxGesture
: <conditional>@figure-location ;
;
rule figure-location ( properties * )
{
if <target-os>windows in $(properties)
{
return <location>win ;
}
else
{
return <location>unix ;
}
}
Adjust to taste.
- 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