Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2005-08-03 09:15:24


On Wednesday 03 August 2005 18:10, Johannes Brunen wrote:
> I would like to build a static library 'test' for debug and release and
> install it to a different location. I tried the following, which works
> fine:
>
> project test
>
> : requirements <link>static
> : source-location src
> : usage-requirements <include>./inc
>
> ;
>
> lib test : [ glob src *.cxx ] : <include>inc ;
>
> install Test : test : <variant>release:<location>./lib
> <variant>debug:<location>./libd ;
>
> However, I would like to have different names for the debug and the release
> library, i.e. test.lib and testd.lib, respecitvely.
>
> I this possible with BBv2? Can anyone give some help on this?

import type ;
rule my-tag ( name : type ? : property-set )
{
if [ type.is-derived $(type) LIB ]
{
if [ $(property-set).get <variant> ] = debug
{
return $(name)d ;
}
}
}

lib test : [ glob ...... ] : <include>inc <tag>@$(__name__).my-tag ;

should do the trick. BTW, [ glob src *.cxx ] looks suspicious. Don't you
mean [ glob src/*.cxx ] ?

- Volodya

-- 
Vladimir Prus
http://vladimir_prus.blogspot.com
Boost.Build V2: http://boost.org/boost-build2
 

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