Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2006-02-06 10:44:46

On Monday 06 February 2006 03:17, Bernhard Glück wrote:
> Very short question:
> How can i get the current variant into a variable ( not in a target )
> e.g something like
> local variantName = getvariant ;
> which should set variantName to debug,release or profile ( with the
> standard defined variants )
> Or would there be another easiert way to customize a directory for
> installation ?
> We have a quite large library in development and want to install all
> built files in directories like
> Distribution/Platform/LinkStyle/Variant
> Right now i create a path-constant with the install directory out of
> platform and link styles but i can't get the variant name as a string.

If you're really brave, you can take the attached patch, apply it to your
Boost.Build, and then use something like:

  exe a : a.cpp ;

  install dist : a : <indirect-conditional>$(__name__).mess-with-properties ;

  rule mess-with-properties ( properties * )
      if <variant>debug in $(properties)
           return <location>MYDEBUG ;

The patch is work-in-progress on
and will be done in a couple of days, so you might just wait a bit until the
interface and semantics is finalized.

- Volodya

Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at