Boost logo

Boost-Build :

From: Bojan Resnik (resnikb_at_[hidden])
Date: 2006-09-25 03:32:27


> Hello,
>
> I'd like to have different stage locations for different toolsets for
> the code
>
> install stage
> : /libs/$(libraries)
> : <location>stage/$(toolset_name)
> ;
>
> How it is possible to get <toolset> value?

  You could use the <conditional> feature to add requirements
dynamically. More information about this feature can be found at

http://boost.org/boost-build2/doc/html/bbv2/advanced/targets.html#bbv2.advanced.targets.requirements

----
import feature ;
install stage
   :   /libs/$(libraries)
   :   <conditional>@toolset-path
   ;
rule toolset-path ( properties * )
{
    # Get toolset and toolset version
    local toolset = [ feature.get-values <toolset> : $(properties) ] ;
    local version = [ feature.get-values <toolset-$(toolset):version>
: $(properties) ] ;
    # Add this to the requirements
    return <location>stage/$(toolset)/$(version) ;
}
----
-- 
Bojan Resnik

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