Boost logo

Boost-Build :

Subject: Re: [Boost-build] How to adjust/redefine default variants "debug", "release" and "profiling"
From: Vladimir Prus (ghost_at_[hidden])
Date: 2009-11-11 05:15:52

On Wednesday 11 November 2009 Deniz Bahadir wrote:

> Hello everyone,
> I have a short question concerning the default build variants "debug", "release", and "profiling":
> Is it possible to change some features for these default variants or add some new? (And how?)
> I do not want to inherit these variants but instead change them directly.
> For example, I like to add a preprocessor-define "DEBUG" to the debug variant, (but not to the others).
> By searching this list I already found a way to change some of the default-settings by doing the following:
> # Rearrange default features to our specs
> import feature ;
> feature.set-default runtime-debugging : off ;
> However, as far as I understand, this changes the default value globally for all three default variants and it seems not to be possible to do it just for one variant. I was also not able to add a preprocessor-define (at least globally to all variants) using this mechanism.
> So hopefully someone can help me.


there's no 'clean' way to do this. However, can you try this:

        module feature
                <variant>debug.components = <optimization>off <define>FOOBAR ;

This explicitly pokes at relevant settings inside the 'feature' module.
Let me know if this helps.

- Volodya

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