Boost logo

Boost :

Subject: Re: [boost] Boost Build and -Wall
From: Vladimir Prus (ghost_at_[hidden])
Date: 2014-08-29 00:33:57


On 08/29/2014 12:12 AM, Emil Dotchevski wrote:
> I see that in Boost Build <warnings>on translates to -Wall. What value do I
> specify for <warnings> to get the compiler-default warnings level?

Emil,

there's no way to do it - the assumption was that you can just not specify
<warnings> property for the compiler default to take effect.

If parent project has explicit "<warnings>on" as requirement, a child project
can cancel it using "-<warnings>on" as requirement.

If there's another situation where it would not work, could you describe it?
Certainly implementing what you ask for is not hard (see untested patch below), but
it would be interesting to know your use case.

- Volodya

diff --git a/src/tools/builtin.jam b/src/tools/builtin.jam
index d62680a..7f68ea8 100644
--- a/src/tools/builtin.jam
+++ b/src/tools/builtin.jam
@@ -166,6 +166,7 @@ feature.feature warnings :
      on # Enable default/"reasonable" warning level for the tool.
      all # Enable all possible warnings issued by the tool.
      off # Disable all warnings issued by the tool.
+ default # Just use compiler defaults
    : incidental propagated ;

  feature.feature warnings-as-errors :


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk