Boost logo

Boost-Build :

From: Reece Dunn (msclrhd_at_[hidden])
Date: 2005-09-17 13:09:37


Andrey Melnikov wrote:
> Reece Dunn wrote:
>
>>Alexey Pakhunov wrote:
>>>Also the feature should not be 'propagated'. It should be 'free' because
>>>it does not affect the result of compilation. It only affects the
>>>warnings that will be displayed.
>>
>>Thanks for the clarification... I will update this :).
>
> According to http://tinyurl.com/7grs8#bbv2.reference.features.attributes
> it isn't free either, because it does have a limited set or values. IMO
> it's "incidental".

Thanks for the link! In the description of incidental: "A feature that
controls a compiler's warning level is one example of a likely
incidental feature." :). Even Volodya agrees with you.

I have provided an updated diff based on feedback.

- Reece
 --------------070301080808060105060709 Content-Type: text/plain;
name="warnings.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="warnings.diff"

? msvc64.diff
? warnings.diff
? warnings2.diff
Index: borland.jam
===================================================================
RCS file: /cvsroot/boost/boost/tools/build/v2/tools/borland.jam,v
retrieving revision 1.17
diff -u -r1.17 borland.jam
--- borland.jam 16 Jun 2005 09:38:45 -0000 1.17
+++ borland.jam 17 Sep 2005 18:06:36 -0000
@@ -67,6 +67,11 @@
flags borland CFLAGS <inlining>on : -vi -w-inl ;
flags borland CFLAGS <inlining>full : -vi -w-inl ;

+flags borland.compile OPTIONS <warnings>on : ;
+flags borland.compile OPTIONS <warnings>off : -w- ;
+flags borland.compile OPTIONS <warnings>all : -w ;
+flags borland.compile OPTIONS <warnings-as-errors>on : -w! ;
+

# Deal with various runtime configs...

Index: builtin.jam
===================================================================
RCS file: /cvsroot/boost/boost/tools/build/v2/tools/builtin.jam,v
retrieving revision 1.178
diff -u -r1.178 builtin.jam
--- builtin.jam 14 Sep 2005 09:54:14 -0000 1.178
+++ builtin.jam 17 Sep 2005 18:06:37 -0000
@@ -79,6 +79,17 @@
feature dependency : : free dependency incidental ;
feature implicit-dependency : : free dependency incidental ;

+feature warnings :
+ on # turn warnings on
+ off # turn warnings off
+ all # enable all warnings
+ : incidental ;
+
+feature warnings-as-errors :
+ off # do not fail the compilation if there are warnings
+ on # fail the compilation if there are warnings
+ : incidental ;
+
feature source : : free dependency incidental ;
feature library : : free dependency incidental ;
feature file : : free dependency incidental ;
Index: cw.jam
===================================================================
RCS file: /cvsroot/boost/boost/tools/build/v2/tools/cw.jam,v
retrieving revision 1.5
diff -u -r1.5 cw.jam
--- cw.jam 28 Jun 2005 09:35:45 -0000 1.5
+++ cw.jam 17 Sep 2005 18:06:37 -0000
@@ -133,6 +133,11 @@
flags cw.compile CFLAGS <exception-handling>off : -Cpp_exceptions off ;
flags cw.compile CFLAGS <rtti>off : -RTTI off ;

+flags cw.compile CFLAGS <warnings>on : -w on ;
+flags cw.compile CFLAGS <warnings>off : -w off ;
+flags cw.compile CFLAGS <warnings>all : -w all ;
+flags cw.compile CFLAGS <warnings-as-errors>on : -w error ;
+
flags cw.compile USER_CFLAGS <cflags> : ;
flags cw.compile.c++ USER_CFLAGS <cxxflags> : ;

Index: gcc.jam
===================================================================
RCS file: /cvsroot/boost/boost/tools/build/v2/tools/gcc.jam,v
retrieving revision 1.55
diff -u -r1.55 gcc.jam
--- gcc.jam 1 Sep 2005 08:04:48 -0000 1.55
+++ gcc.jam 17 Sep 2005 18:06:37 -0000
@@ -78,6 +78,11 @@
flags gcc.compile OPTIONS <inlining>on : -Wno-inline ;
flags gcc.compile OPTIONS <inlining>full : -finline-functions -Wno-inline ;

+flags gcc.compile CFLAGS <warnings>on : ;
+flags gcc.compile CFLAGS <warnings>off : -w ;
+flags gcc.compile CFLAGS <warnings>all : -Wall ;
+flags gcc.compile CFLAGS <warnings-as-errors>on : -Werror ;
+
flags gcc.compile OPTIONS <debug-symbols>on : -g ;
flags gcc.compile OPTIONS <profiling>on : -pg ;
# On cygwin and mingw, gcc generates position independent code by default,
Index: msvc.jam
===================================================================
RCS file: /cvsroot/boost/boost/tools/build/v2/tools/msvc.jam,v
retrieving revision 1.50
diff -u -r1.50 msvc.jam
--- msvc.jam 2 Sep 2005 07:35:54 -0000 1.50
+++ msvc.jam 17 Sep 2005 18:06:37 -0000
@@ -268,6 +268,11 @@
flags msvc.compile CFLAGS <inlining>on : /Ob1 ;
flags msvc.compile CFLAGS <inlining>full : /Ob2 ;

+flags msvc.compile CFLAGS <warnings>on : /W3 ;
+flags msvc.compile CFLAGS <warnings>off : /W0 ;
+flags msvc.compile CFLAGS <warnings>all : /W4 /Wp64 ;
+flags msvc.compile CFLAGS <warnings-as-errors>on : /WX ;
+
flags msvc.compile C++FLAGS <exception-handling>on/<asynch-exceptions>off/<extern-c-nothrow>off : /EHs ;
flags msvc.compile C++FLAGS <exception-handling>on/<asynch-exceptions>off/<extern-c-nothrow>on : /EHsc ;
flags msvc.compile C++FLAGS <exception-handling>on/<asynch-exceptions>on/<extern-c-nothrow>off : /EHa ;
 --------------070301080808060105060709--


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk