You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by sh...@apache.org on 2009/05/12 00:28:27 UTC

svn commit: r773714 - in /qpid/trunk/qpid/cpp: examples/CMakeLists.txt src/CMakeLists.txt src/qpid/framing/FrameDecoder.h src/tests/CMakeLists.txt

Author: shuston
Date: Mon May 11 22:28:26 2009
New Revision: 773714

URL: http://svn.apache.org/viewvc?rev=773714&view=rev
Log:
Patch small probs building tests, examples on Windows

Modified:
    qpid/trunk/qpid/cpp/examples/CMakeLists.txt
    qpid/trunk/qpid/cpp/src/CMakeLists.txt
    qpid/trunk/qpid/cpp/src/qpid/framing/FrameDecoder.h
    qpid/trunk/qpid/cpp/src/tests/CMakeLists.txt

Modified: qpid/trunk/qpid/cpp/examples/CMakeLists.txt
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/examples/CMakeLists.txt?rev=773714&r1=773713&r2=773714&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/examples/CMakeLists.txt (original)
+++ qpid/trunk/qpid/cpp/examples/CMakeLists.txt Mon May 11 22:28:26 2009
@@ -25,9 +25,15 @@
 # This will probably need some fiddling to get right for installed kits.
 get_directory_property(QPIDC_TOP PARENT_DIRECTORY)
 include_directories(${QPIDC_TOP}/src ${QPIDC_TOP}/src/gen)
+
+# Shouldn't need this... but there are still client header inclusions of Boost.
 include_directories( ${Boost_INCLUDE_DIR} )
 link_directories( ${Boost_LIBRARY_DIRS} )
 
+if (MSVC)
+  add_definitions( /D "NOMINMAX" /D "WIN32_LEAN_AND_MEAN" )
+endif (MSVC)
+
 # There are numerous duplicate names within the examples. Since all target
 # names must be unique, define a macro to prepend a prefix and manage the
 # actual names.

Modified: qpid/trunk/qpid/cpp/src/CMakeLists.txt
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/CMakeLists.txt?rev=773714&r1=773713&r2=773714&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/CMakeLists.txt (original)
+++ qpid/trunk/qpid/cpp/src/CMakeLists.txt Mon May 11 22:28:26 2009
@@ -143,7 +143,7 @@
 
 # Expand a bit from the basic Find_Boost; be specific about what's needed.
 find_package(Boost 1.33 REQUIRED
-             COMPONENTS date_time program_options thread unit_test_framework)
+             COMPONENTS date_time program_options regex thread unit_test_framework)
 if(NOT Boost_FOUND)
   message(FATAL_ERROR "Boost C++ libraries not found.  Please install or try setting BOOST_ROOT")
 endif(NOT Boost_FOUND)
@@ -222,9 +222,11 @@
                qpid/xml/XmlExchange.h
                qpid/xml/XmlExchangePlugin.cpp)
   target_link_libraries (xml xerces-c xqilla qpidbroker pthread)
-  set_target_properties (xml PROPERTIES
-                         PREFIX ""
-                         LINK_FLAGS -Wl,--no-undefined)
+  if (CMAKE_COMPILER_IS_GNUCXX)
+    set_target_properties (xml PROPERTIES
+                           PREFIX ""
+                           LINK_FLAGS -Wl,--no-undefined)
+  endif (CMAKE_COMPILER_IS_GNUCXX)
 endif (BUILD_XML)
 
 # Build the ACL plugin
@@ -246,9 +248,11 @@
       )
   add_library (acl MODULE ${acl_SOURCES})
   target_link_libraries (acl qpidbroker)
-  set_target_properties (acl PROPERTIES
-                         PREFIX ""
-                         LINK_FLAGS -Wl,--no-undefined)
+  if (CMAKE_COMPILER_IS_GNUCXX)
+    set_target_properties (acl PROPERTIES
+                           PREFIX ""
+                           LINK_FLAGS -Wl,--no-undefined)
+  endif (CMAKE_COMPILER_IS_GNUCXX)
 endif (BUILD_ACL)
 
 # Check for optional cluster support requirements

Modified: qpid/trunk/qpid/cpp/src/qpid/framing/FrameDecoder.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/framing/FrameDecoder.h?rev=773714&r1=773713&r2=773714&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/framing/FrameDecoder.h (original)
+++ qpid/trunk/qpid/cpp/src/qpid/framing/FrameDecoder.h Mon May 11 22:28:26 2009
@@ -23,6 +23,7 @@
  */
 
 #include "AMQFrame.h"
+#include "qpid/CommonImportExport.h"
 
 namespace qpid {
 namespace framing {
@@ -34,7 +35,7 @@
 class FrameDecoder
 {
   public:
-    bool decode(Buffer& buffer);
+    QPID_COMMON_EXTERN bool decode(Buffer& buffer);
     const AMQFrame& getFrame() const { return frame; }
     AMQFrame& getFrame() { return frame; }
 

Modified: qpid/trunk/qpid/cpp/src/tests/CMakeLists.txt
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/CMakeLists.txt?rev=773714&r1=773713&r2=773714&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/CMakeLists.txt (original)
+++ qpid/trunk/qpid/cpp/src/tests/CMakeLists.txt Mon May 11 22:28:26 2009
@@ -22,19 +22,22 @@
 
 include (FindPythonInterp)
 
+# Using the Boost DLLs triggers warning 4275 on Visual Studio
+# (non dll-interface class used as base for dll-interface class).
+# This is ok, so suppress the warning.
+if (MSVC)
+  add_definitions( /wd4275 )
+endif (MSVC)
+
+set (qpid_test_boost_libs ${Boost_PROGRAM_OPTIONS_LIBRARY} ${Boost_REGEX_LIBRARY})
+
 #
 # Unit test program
 #
 # Unit tests are built as a single program to reduce valgrind overhead
-# when running the tests. If you want to build a subset of the tests do 
-#   rm -f unit_test; make unit_test unit_test_OBJECTS="unit_test.o SelectedTest.o"
-# 
-set (qpid_test_boost_libs boost_unit_test_framework boost_regex)
-#TESTS+=unit_test
-#check_PROGRAMS+=unit_test
-#unit_test_LDADD=-lboost_unit_test_framework -lboost_regex  \
-#	$(lib_client) $(lib_broker) $(lib_console)
-#
+# when running the tests. If you want to build a subset of the tests run
+# ccmake and set unit_tests_to_build to the set you want to build.
+
 set(unit_tests_to_build
     unit_test
     exception_test
@@ -92,11 +95,6 @@
 endif (QPID_HAS_XML)
 mark_as_advanced(unit_tests_to_build)
 
-#message(DEBUG "unit_tests_to_build: ${unit_tests_to_build}")
-#string (REPLACE ";" ".cpp;"
-#        unit_test_SOURCES
-#        ${unit_tests_to_build})
-
 # Disabled till we move to amqp_0_10 codec.
 # 	amqp_0_10/serialize.cpp allSegmentTypes.h \
 # 	amqp_0_10/ProxyTemplate.cpp \



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org