From: Reece Dunn (msclrhd_at_[hidden])
Date: 2005-02-07 07:45:28
Toon Knapen wrote:
> When libraries and executables are compiled, we would like to make the
> difference between the variants (debug and release) in order to store
> them in the same directory.
> So how can we add a postfix to the result of a compilation (binary or
> library) or staged target according to its variant?
> For example, is there an instruction to add the postfix '_d' to the
> output library when it is compiled in debug mode like in
> stage bin : my_app : <variant>debug:<name>my_app_d ;
In BBv2, the latest CVS supports this. See the "Sone 'stage' changes"
Vladimir Prus wrote:
> The rule can be written line this:
> rule my-tag ( name : type ? : property-set )
> if $(type) = EXE && [ $(property-set).get <variant> ] = debug
> return [ virtual-target.apply-suffix $(name)_d : $(type)
> : $(property-set) ] ;
> If you add <tag>@mymodule.my-tag to properties, then all executable
> get "_d" added in debug variant. The above rule returns something
> EXE/debug combination, in all the other cases nothings is returned and
> default name is used.
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