Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2004-10-11 04:06:27

Toon Knapen wrote:

> Vladimir Prus wrote:
>> This question was asked a few times, so I've added a FAQ entry:
> I know but could not find one.

Yea, I've added it just today.

>> Does it answer your question?
> only partially. You suggest to use <cflags>. But then I end up with the
> normal flags (e.g. -O3 in a release build) and the extra flag I
> specified (which is -O0). I'm not sure what the compiler is going to do
> in this case but the command-line is definitly not very clean. Jurgen
> suggest to use <optimization>off which improves the situation because
> there will only be one '-O' flag used.

Yes, <cflags> is just an idea. You can use any other requirements, including

> However, now I would like to alter the optimization only for a release
> build (because I want -O0 in debug (which will be the case
> automatically) and -O1 in release)?

I think that's the case for conditional requirements

obj foo : foo.cpp : <variant>release:<cxxflags>-O1 ;

There will be both -O3 (from "release") and "-01" on the command libe, but I
believe -01 will come last and so override -03.

- Volodya

- Volodya


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