From e5dc2d93a3022c8f7ad1c701c5b1e27a4522628f Mon Sep 17 00:00:00 2001 From: beveloper Date: Fri, 12 Jul 2002 16:47:41 +0000 Subject: [PATCH] Adding suport to see warnings at compile time. I'm not sure if this is added in the correct way, please fix it. As many files generate warnigs, it's inactive by default. To compile with enabled warnings, execute jam like this: $ WARNINGS=true jam git-svn-id: file:///srv/svn/repos/haiku/trunk/current@141 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- Jamrules | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Jamrules b/Jamrules index 5575dc4429..c8de694b29 100644 --- a/Jamrules +++ b/Jamrules @@ -26,6 +26,23 @@ if $(METROWERKS) { OBOS_TARGET_DIR ?= "x86" ; } +# Enable warnings only if WARNINGS is defined +# Should be enabled by default later + +if $(WARNINGS) { + # For an explanation of the different warning options, see: + # http://gcc.gnu.org/onlinedocs/gcc-2.95.3/gcc_2.html + # to get even more warnings, add: + # -Wwrite-strings (doesn't work well with some Be headers) + # -Wundef (dito) + # -Wconversion (gets you many warnings about implicit conversions) + # -W (gets you even more warnigs) + CCFLAGS ?= "-Wall -Wno-multichar -Wmissing-prototypes" ; + CCFLAGS += "-Wpointer-arith -Wcast-align -Wsign-compare" ; + C++FLAGS ?= "-Wall -Wno-multichar -Wmissing-prototypes -Wno-ctor-dtor-privacy -Woverloaded-virtual" ; + C++FLAGS += "-Wpointer-arith -Wcast-align -Wsign-compare" ; +} + KERNEL_CCFLAGS ?= "-Wall -Wno-multichar -Wmissing-prototypes -finline -nostdinc" ; KERNEL_CCFLAGS += "-fno-builtin -D$(OBOS_TARGET_DEFINE) " ;