Boost logo

Boost-Build :

Subject: Re: [Boost-build] How to adjust/redefine default variants "debug", "release" and "profiling"
From: Anthony Foglia (AFoglia_at_[hidden])
Date: 2009-11-11 10:19:30

Deniz Bahadir wrote:
> 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.

I don't know exactly what you have in mind, but if all your builds are
done in the same project, you can add the define, you can add the define
to the list of requirements.

   : requirements

It's not the same as changing the default variants, but it has the same
effect within the project. I haven't tried it, but it should also work

   : requirements

Anthony Foglia
Princeton Consultants
(609) 987-8787 x233

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