You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ac...@apache.org on 2006/10/24 23:13:02 UTC

svn commit: r467486 - in /incubator/qpid/trunk/qpid/cpp: README options.mk src/qpid/io/LFProcessor.cpp test/unit/qpid/broker/ChannelTest.cpp

Author: aconway
Date: Tue Oct 24 14:13:01 2006
New Revision: 467486

URL: http://svn.apache.org/viewvc?view=rev&rev=467486
Log:
Makefile support for optimized release build. Do make BUILD=RELEASE.

Modified:
    incubator/qpid/trunk/qpid/cpp/README
    incubator/qpid/trunk/qpid/cpp/options.mk
    incubator/qpid/trunk/qpid/cpp/src/qpid/io/LFProcessor.cpp
    incubator/qpid/trunk/qpid/cpp/test/unit/qpid/broker/ChannelTest.cpp

Modified: incubator/qpid/trunk/qpid/cpp/README
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/README?view=diff&rev=467486&r1=467485&r2=467486
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/README (original)
+++ incubator/qpid/trunk/qpid/cpp/README Tue Oct 24 14:13:01 2006
@@ -5,22 +5,25 @@
 == Prerequisites ==
 
 Required to build:
- * Apache Portable Runtime 1.2.7:  http://apr.apache.org/
- * CppUnit: http://cppunit.sourceforge.net
- * boost: http://www.boost.org
+ * Apache Portable Runtime 1.2.7:  http://apr.apache.org
+ * CppUnit 1.11.4: http://cppunit.sourceforge.net
+ * boost 1.33.1: http://www.boost.org
 
 Optional: to generate source code documentation you need:
- * doxygen: http://sourceforge.net/projects/doxygen/ 
- * graphviz - http://www.graphviz.org/
+ * doxygen 1.4.6: http://sourceforge.net/projects/doxygen/ 
+ * graphviz 2.8: http://www.graphviz.org/
 
-On Fedora: yum install apr apr-devel cppunit cppunit-devel boost boost-devel doxygen graphviz
+If you use yum to install packages:
+# yum install apr apr-devel cppunit cppunit-devel boost boost-devel doxygen graphviz
 
 == Build and test ==
+For a debug build:
+> make
+For an optimized release build:
+> make BUILD=RELEASE
 
-make
-
-Default target builds and tests everything, see Makefile for other
-targets.
+The default target "test" builds everything and runs all tests. See
+the Makefile for more targets.
 
 === Unit tests ===
 Unit tests are built as .so files containing CppUnit plugins. 

Modified: incubator/qpid/trunk/qpid/cpp/options.mk
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/options.mk?view=diff&rev=467486&r1=467485&r2=467486
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/options.mk (original)
+++ incubator/qpid/trunk/qpid/cpp/options.mk Tue Oct 24 14:13:01 2006
@@ -23,7 +23,10 @@
 
 ## Compile flags
 
-DEBUG := -ggdb3 -O0
+# Release vs. debug flags, default to debug
+DEBUG   := -ggdb3
+RELEASE := -O3 -DNDEBUG
+BUILD := DEBUG
 
 # _USE_APR_IO_ set when APR IO build is desired.
 DEFINES := -D _USE_APR_IO_
@@ -33,11 +36,12 @@
 # qpid-dev list.
 # 
 # The following warnings deliberately omitted, they warn on valid code.
-# -Wno-unreachable-code -Wpadded
+# -Wno-unreachable-code -Wpadded -Winline
 # 
-WARN := -Werror -pedantic -Wall -Wextra -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wno-long-long -Wvolatile-register-var -Winvalid-pch -Winline 
+WARN := -Werror -pedantic -Wall -Wextra -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wno-long-long -Wvolatile-register-var -Winvalid-pch
+
 INCLUDES :=  -Isrc -Igen $(EXTRA_INCLUDES) 
-CXXFLAGS := $(DEBUG) $(DEFINES) $(WARN) -MMD -fpic $(INCLUDES)
+CXXFLAGS := $($(BUILD)) $(DEFINES) $(WARN) -MMD -fpic $(INCLUDES)
 ## Link flags
 # Allow exes to find libs without env changes. Remove for release builds.
 LDFLAGS := -Llib $(EXTRA_LIBDIRS) 

Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/io/LFProcessor.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/io/LFProcessor.cpp?view=diff&rev=467486&r1=467485&r2=467486
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/io/LFProcessor.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/io/LFProcessor.cpp Tue Oct 24 14:13:01 2006
@@ -102,8 +102,8 @@
     return count == 0; 
 }
 
-void LFProcessor::poll(){
-    apr_status_t status;
+void LFProcessor::poll() {
+    apr_status_t status = APR_EGENERAL;
     do{
         current = 0;
         if(!stopped){

Modified: incubator/qpid/trunk/qpid/cpp/test/unit/qpid/broker/ChannelTest.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/test/unit/qpid/broker/ChannelTest.cpp?view=diff&rev=467486&r1=467485&r2=467486
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/test/unit/qpid/broker/ChannelTest.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/test/unit/qpid/broker/ChannelTest.cpp Tue Oct 24 14:13:01 2006
@@ -76,7 +76,7 @@
         Channel channel(0, 0, 0);
         CPPUNIT_ASSERT(!channel.exists("my_consumer"));
 
-        ConnectionToken* owner;
+        ConnectionToken* owner = 0;
         string tag("my_consumer");
         channel.consume(tag, queue, false, false, owner);
         string tagA;