Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2006-09-07 01:35:54

On Thursday 31 August 2006 13:18, Artem Alimarine wrote:
> > And sometimes it could be just -TP -c. The question is: should we
> > specify -W3 explicitly if -W3 is by default?
> I would say by default you call the compiler with the minimal required
> flags. So, no -W3 by default.
> > Without -W3 user would be able to specify cflags=-W4 without getting a
> > warning. And one more question: should we specify -W3 if a user
> > requests <msvc_warning_level>3 explicitly?
> If the user explicitly ask for something, it must be explicitly present
> in the compiler command line.

This is hard to do, in general. By the time properties get to toolset module,
it's not possible to tell if they came from command line, or are default
values added by Boost.Build.

> > Should the toolsets know about default values for all supported
> > options? Should they display [Implicit options: -W3 -EHc] in a debug
> > log?
> In my oppinion the domain of each option should contain a special value
> "default" and the toolset should give an interpretation of that value.
> The default interpretation of the value "default" is to pass nothing to
> the compiler.

That's a bit different from what we do now -- there are some explicit defaults
for some options. I think for gcc, we increase the warning level a bit --
which is a good thing in my opinion.

Anyway, in the case when we want to pass -W3 to compiler, but -W3 is a
default, I'm not sure what to do. Not passing -W3 can lead to nicer command
lines, but then if compiler's default changes from version to version, we'll
need ever more toolset-version-dependent logic, which is generally hard to
get right.

I'd go for safety and pass all options. Experts in msvc.jam are free to
disagree ;-)

- Volodya

Vladimir Prus
Boost.Build V2:

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