diff options
author | Alan Conway <aconway@apache.org> | 2006-10-11 15:50:15 +0000 |
---|---|---|
committer | Alan Conway <aconway@apache.org> | 2006-10-11 15:50:15 +0000 |
commit | 2bcadbb42a6fb2f096c1fc0a4b957d64a5024ef6 (patch) | |
tree | 886eb0659c6f28c2f1d26de7d5fd29fff0072dc5 /cpp/options.mk | |
parent | 9fc2b6c5f0848d65f1bf20e62279c055d12a1d40 (diff) | |
download | qpid-python-2bcadbb42a6fb2f096c1fc0a4b957d64a5024ef6.tar.gz |
Turned up gcc warnings, fixed warnings in code, enabled -Werror.
Note: #include "qpid_test_plugin.h" instead of <cppunit/TestPlugin.h>
Works around warning from a cppunit macro.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@462834 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/options.mk')
-rw-r--r-- | cpp/options.mk | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/cpp/options.mk b/cpp/options.mk index 904f58c774..f5d7d950f8 100644 --- a/cpp/options.mk +++ b/cpp/options.mk @@ -24,15 +24,26 @@ BIN_DIR = ${QPID_CPP_HOME}/bin APR_HOME = /usr/local/apr # Compile flags -DEBUG = -ggdb3 +DEBUG = -ggdb3 -O0 +OPTIMIZE = # _USE_APR_IO_ set when APR IO build is desired. -OPT = -D _USE_APR_IO_ #-O3 +DEFINES = -D _USE_APR_IO_ APR_INCLUDES=-I ${APR_HOME}/include/apr-1/ COMMON_INCLUDES = -I ${COMMON_HOME}/framing/inc -I ${COMMON_HOME}/framing/generated -I ${COMMON_HOME}/concurrent/inc -I ${COMMON_HOME}/io/inc -I ${COMMON_HOME}/error/inc -I $(COMMON_HOME)/utils/inc ${APR_INCLUDES} SRC_INCLUDES = $(COMMON_INCLUDES) -I inc -TEST_INCLUDES = $(COMMON_INCLUDES) -I ../inc +TEST_INCLUDES = $(COMMON_INCLUDES) -I ../inc -I $(QPID_CPP_HOME)/test/include INCLUDES=$(SRC_INCLUDES) # Default to src -CXXFLAGS = $(DEBUG) $(OPT) -MMD -fpic $(INCLUDES) + +# Warnings: Enable as many as possible, keep the code clean. Please +# do not disable warnings or remove -Werror without discussing on +# qpid-dev list. +# +# The following warnings deliberately omitted, they warn on valid code. +# -Wno-unreachable-code -Wpadded +# +WARN = -Werror -pedantic -Wall -Wextra -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wno-long-long -Wvolatile-register-var -Winvalid-pch -Winline + +CXXFLAGS = $(DEBUG) $(OPTIMIZE) $(DEFINES) $(WARN) -MMD -fpic $(INCLUDES) # General link flags LDFLAGS= -L $(LIB_DIR) -L ${APR_HOME}/lib $(RPATH) |