From c888bb56477cc210029a5fbce99a731da414b47c Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Wed, 21 Sep 2005 13:44:06 +0000 Subject: [PATCH] New features and . Patch from Reece Dunn. [SVN r31068] --- src/tools/borland.jam | 9 ++++++--- src/tools/builtin.jam | 11 +++++++++++ src/tools/cw.jam | 5 +++++ src/tools/gcc.jam | 10 +++++++--- src/tools/msvc.jam | 5 +++++ 5 files changed, 34 insertions(+), 6 deletions(-) diff --git a/src/tools/borland.jam b/src/tools/borland.jam index aa30331ac..57798f0f7 100644 --- a/src/tools/borland.jam +++ b/src/tools/borland.jam @@ -67,6 +67,10 @@ flags borland CFLAGS off : -vi- ; flags borland CFLAGS on : -vi -w-inl ; flags borland CFLAGS full : -vi -w-inl ; +flags borland.compile OPTIONS off : -w- ; +flags borland.compile OPTIONS all : -w ; +flags borland.compile OPTIONS on : -w! ; + # Deal with various runtime configs... @@ -99,7 +103,6 @@ flags borland NEED_IMPLIB LIB/shared : "" ; # -q no banner # -c compile to object # -P C++ code regardless of file extention -# -w turns on all warnings # -Ve zero sized empty base classes, this option is on in the IDE by default # and effects binary compatibility. # -Vx zero sized empty members, this option is on in the IDE by default @@ -113,13 +116,13 @@ flags borland NEED_IMPLIB LIB/shared : "" ; actions compile.c++ { - "$(CONFIG_COMMAND)" -j5 -g255 -q -c -P -w -Ve -Vx -a8 -b- $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -I"$(STDHDRS)" -o"$(<)" "$(>)" + "$(CONFIG_COMMAND)" -j5 -g255 -q -c -P -Ve -Vx -a8 -b- $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -I"$(STDHDRS)" -o"$(<)" "$(>)" } # For C, we don't pass -P flag actions compile.c { - "$(CONFIG_COMMAND)" -j5 -g255 -q -c -w -Ve -Vx -a8 -b- $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -I"$(STDHDRS)" -o"$(<)" "$(>)" + "$(CONFIG_COMMAND)" -j5 -g255 -q -c -Ve -Vx -a8 -b- $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -I"$(STDHDRS)" -o"$(<)" "$(>)" } diff --git a/src/tools/builtin.jam b/src/tools/builtin.jam index 5b9c03468..c75872a91 100644 --- a/src/tools/builtin.jam +++ b/src/tools/builtin.jam @@ -79,6 +79,17 @@ feature use : : free dependency incidental ; feature dependency : : free dependency incidental ; feature implicit-dependency : : free dependency incidental ; +feature warnings : + all # enable all warnings issued by the tool + on # enable default warning level for the tool + off # disable all warnings issued by the tool + : 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 ; diff --git a/src/tools/cw.jam b/src/tools/cw.jam index 394c80f46..a5fcac085 100644 --- a/src/tools/cw.jam +++ b/src/tools/cw.jam @@ -133,6 +133,11 @@ flags cw.compile CFLAGS full : -inline all ; flags cw.compile CFLAGS off : -Cpp_exceptions off ; flags cw.compile CFLAGS off : -RTTI off ; +flags cw.compile CFLAGS on : -w on ; +flags cw.compile CFLAGS off : -w off ; +flags cw.compile CFLAGS all : -w all ; +flags cw.compile CFLAGS on : -w error ; + flags cw.compile USER_CFLAGS : ; flags cw.compile.c++ USER_CFLAGS : ; diff --git a/src/tools/gcc.jam b/src/tools/gcc.jam index 5491ce307..7fcfaccd0 100644 --- a/src/tools/gcc.jam +++ b/src/tools/gcc.jam @@ -78,6 +78,10 @@ flags gcc.compile OPTIONS off : -fno-inline ; flags gcc.compile OPTIONS on : -Wno-inline ; flags gcc.compile OPTIONS full : -finline-functions -Wno-inline ; +flags gcc.compile OPTIONS off : -w ; +flags gcc.compile OPTIONS all : -Wall ; +flags gcc.compile OPTIONS on : -Werror ; + flags gcc.compile OPTIONS on : -g ; flags gcc.compile OPTIONS on : -pg ; # On cygwin and mingw, gcc generates position independent code by default, @@ -134,7 +138,7 @@ rule compile.c++ actions compile.c++ { - "$(CONFIG_COMMAND)" $(LANG) -Wall -ftemplate-depth-100 $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -o "$(<)" "$(>)" + "$(CONFIG_COMMAND)" $(LANG) -ftemplate-depth-100 $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -o "$(<)" "$(>)" } rule compile.c @@ -151,7 +155,7 @@ rule compile.c actions compile.c { - "$(CONFIG_COMMAND)" $(LANG) -Wall $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -o "$(<)" "$(>)" + "$(CONFIG_COMMAND)" $(LANG) $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -o "$(<)" "$(>)" } rule compile.asm @@ -161,7 +165,7 @@ rule compile.asm actions compile.asm { - "$(CONFIG_COMMAND)" $(LANG) -Wall $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -o "$(<)" "$(>)" + "$(CONFIG_COMMAND)" $(LANG) $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -o "$(<)" "$(>)" } # The class which check that we don't try to use diff --git a/src/tools/msvc.jam b/src/tools/msvc.jam index 6ef9f46a0..d385ce84c 100644 --- a/src/tools/msvc.jam +++ b/src/tools/msvc.jam @@ -268,6 +268,11 @@ flags msvc.compile CFLAGS off : /Ob0 ; flags msvc.compile CFLAGS on : /Ob1 ; flags msvc.compile CFLAGS full : /Ob2 ; +flags msvc.compile CFLAGS on : /W3 ; +flags msvc.compile CFLAGS off : /W0 ; +flags msvc.compile CFLAGS all : /W4 /Wp64 ; +flags msvc.compile CFLAGS on : /WX ; + flags msvc.compile C++FLAGS on/off/off : /EHs ; flags msvc.compile C++FLAGS on/off/on : /EHsc ; flags msvc.compile C++FLAGS on/on/off : /EHa ;