diff options
author | Stephen D. Huston <shuston@apache.org> | 2009-05-11 22:28:26 +0000 |
---|---|---|
committer | Stephen D. Huston <shuston@apache.org> | 2009-05-11 22:28:26 +0000 |
commit | 5f79a061c6331c010a3f7dc98498d0249774d37c (patch) | |
tree | ca1570be40bfaa3355231d9575c447e4c871a664 | |
parent | 6ac75b539d14c1344cf00a696daec110d9710d00 (diff) | |
download | qpid-python-5f79a061c6331c010a3f7dc98498d0249774d37c.tar.gz |
Patch small probs building tests, examples on Windows
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@773714 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | cpp/examples/CMakeLists.txt | 6 | ||||
-rw-r--r-- | cpp/src/CMakeLists.txt | 18 | ||||
-rw-r--r-- | cpp/src/qpid/framing/FrameDecoder.h | 3 | ||||
-rw-r--r-- | cpp/src/tests/CMakeLists.txt | 26 |
4 files changed, 31 insertions, 22 deletions
diff --git a/cpp/examples/CMakeLists.txt b/cpp/examples/CMakeLists.txt index 3c906bd750..73931101bc 100644 --- a/cpp/examples/CMakeLists.txt +++ b/cpp/examples/CMakeLists.txt @@ -25,9 +25,15 @@ endif(COMMAND cmake_policy) # 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. diff --git a/cpp/src/CMakeLists.txt b/cpp/src/CMakeLists.txt index 914984825c..cc2b020bd1 100644 --- a/cpp/src/CMakeLists.txt +++ b/cpp/src/CMakeLists.txt @@ -143,7 +143,7 @@ endif (ENABLE_WARNINGS AND CMAKE_COMPILER_IS_GNUCXX) # 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 @@ if (BUILD_XML) 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 @@ if (BUILD_ACL) ) 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 diff --git a/cpp/src/qpid/framing/FrameDecoder.h b/cpp/src/qpid/framing/FrameDecoder.h index 961cc666a9..bb054f9b42 100644 --- a/cpp/src/qpid/framing/FrameDecoder.h +++ b/cpp/src/qpid/framing/FrameDecoder.h @@ -23,6 +23,7 @@ */ #include "AMQFrame.h" +#include "qpid/CommonImportExport.h" namespace qpid { namespace framing { @@ -34,7 +35,7 @@ namespace framing { class FrameDecoder { public: - bool decode(Buffer& buffer); + QPID_COMMON_EXTERN bool decode(Buffer& buffer); const AMQFrame& getFrame() const { return frame; } AMQFrame& getFrame() { return frame; } diff --git a/cpp/src/tests/CMakeLists.txt b/cpp/src/tests/CMakeLists.txt index 98c4e2ee05..5943f343ec 100644 --- a/cpp/src/tests/CMakeLists.txt +++ b/cpp/src/tests/CMakeLists.txt @@ -22,19 +22,22 @@ include_directories( ${CMAKE_CURRENT_SOURCE_DIR} ) 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 @@ if (QPID_HAS_XML) 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 \ |