qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From astitc...@apache.org
Subject svn commit: r1602021 - in /qpid/trunk/qpid/cpp: bindings/qmf2/examples/cpp/ examples/ src/ src/qpid/ src/qpid/broker/ src/qpid/ha/ src/qpid/log/posix/ src/qpid/store/ src/tests/
Date Wed, 11 Jun 2014 21:35:09 GMT
Author: astitcher
Date: Wed Jun 11 21:35:09 2014
New Revision: 1602021

URL: http://svn.apache.org/r1602021
Log:
QPID-5807: Remove boost::program_options as a header file dependency of qpid/Options.h
- The intent here is to remove the necessity for things using qpid::Options to
  need to link boost::program_options directly.

Added:
    qpid/trunk/qpid/cpp/src/qpid/OptionsTemplates.h
Modified:
    qpid/trunk/qpid/cpp/bindings/qmf2/examples/cpp/CMakeLists.txt
    qpid/trunk/qpid/cpp/examples/CMakeLists.txt
    qpid/trunk/qpid/cpp/src/CMakeLists.txt
    qpid/trunk/qpid/cpp/src/amqp.cmake
    qpid/trunk/qpid/cpp/src/legacystore.cmake
    qpid/trunk/qpid/cpp/src/qpid/Options.cpp
    qpid/trunk/qpid/cpp/src/qpid/Options.h
    qpid/trunk/qpid/cpp/src/qpid/broker/Broker.cpp
    qpid/trunk/qpid/cpp/src/qpid/ha/HaPlugin.cpp
    qpid/trunk/qpid/cpp/src/qpid/log/posix/SinkOptions.cpp
    qpid/trunk/qpid/cpp/src/qpid/store/CMakeLists.txt
    qpid/trunk/qpid/cpp/src/tests/CMakeLists.txt
    qpid/trunk/qpid/cpp/src/tests/qpid-perftest.cpp
    qpid/trunk/qpid/cpp/src/tests/test_tools.h

Modified: qpid/trunk/qpid/cpp/bindings/qmf2/examples/cpp/CMakeLists.txt
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/bindings/qmf2/examples/cpp/CMakeLists.txt?rev=1602021&r1=1602020&r2=1602021&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/bindings/qmf2/examples/cpp/CMakeLists.txt (original)
+++ qpid/trunk/qpid/cpp/bindings/qmf2/examples/cpp/CMakeLists.txt Wed Jun 11 21:35:09 2014
@@ -35,8 +35,6 @@ include_directories( ${Boost_INCLUDE_DIR
 link_directories( ${Boost_LIBRARY_DIRS} )
 
 # Visual Studio needs some Windows-specific simplifications.
-# Linux needs to reference the boost libs, even though they should be
-# resolved via the Qpid libs.
 if (MSVC)
   add_definitions( /D "NOMINMAX" /D "WIN32_LEAN_AND_MEAN" /D "BOOST_ALL_DYN_LINK" )
   # On Windows, prevent the accidental inclusion of Boost headers from
@@ -44,9 +42,6 @@ if (MSVC)
   # Boost in the examples, and references via qpidclient/qpidcommon are
   # resolved in the Qpid libs.
   add_definitions( /D "BOOST_ALL_NO_LIB" )
-else (MSVC)
-  set(_boost_libs_needed ${Boost_PROGRAM_OPTIONS_LIBRARY}
-                         ${Boost_FILESYSTEM_LIBRARY})
 endif (MSVC)
 
 # There are numerous duplicate names within the examples. Since all target

Modified: qpid/trunk/qpid/cpp/examples/CMakeLists.txt
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/examples/CMakeLists.txt?rev=1602021&r1=1602020&r2=1602021&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/examples/CMakeLists.txt (original)
+++ qpid/trunk/qpid/cpp/examples/CMakeLists.txt Wed Jun 11 21:35:09 2014
@@ -35,8 +35,6 @@ include_directories( ${Boost_INCLUDE_DIR
 link_directories( ${Boost_LIBRARY_DIRS} )
 
 # Visual Studio needs some Windows-specific simplifications.
-# Linux needs to reference the boost libs, even though they should be
-# resolved via the Qpid libs.
 if (MSVC)
   add_definitions( /D "NOMINMAX" /D "WIN32_LEAN_AND_MEAN" /D "BOOST_ALL_DYN_LINK" )
   # On Windows, prevent the accidental inclusion of Boost headers from
@@ -44,9 +42,6 @@ if (MSVC)
   # Boost in the examples, and references via qpidclient/qpidcommon are
   # resolved in the Qpid libs.
   add_definitions( /D "BOOST_ALL_NO_LIB" )
-else (MSVC)
-  set(_boost_libs_needed ${Boost_PROGRAM_OPTIONS_LIBRARY}
-                         ${Boost_FILESYSTEM_LIBRARY})
 endif (MSVC)
 
 # There are numerous duplicate names within the examples. Since all target

Modified: qpid/trunk/qpid/cpp/src/CMakeLists.txt
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/CMakeLists.txt?rev=1602021&r1=1602020&r2=1602021&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/CMakeLists.txt (original)
+++ qpid/trunk/qpid/cpp/src/CMakeLists.txt Wed Jun 11 21:35:09 2014
@@ -663,7 +663,7 @@ if (BUILD_HA)
     add_library (ha MODULE ${ha_SOURCES})
     target_link_libraries (ha
                            qpidtypes qpidcommon qpidbroker qpidmessaging
-                           "${Boost_PROGRAM_OPTIONS_LIBRARY}")
+                           ${Boost_PROGRAM_OPTIONS_LIBRARY})
     set_target_properties (ha PROPERTIES
                            PREFIX ""
                            COMPILE_DEFINITIONS _IN_QPID_BROKER
@@ -1021,7 +1021,6 @@ add_msvc_version (qpidclient library dll
 add_library (qpidclient SHARED ${qpidclient_SOURCES})
 
 target_link_libraries (qpidclient qpidcommon qpidtypes
-                       ${Boost_PROGRAM_OPTIONS_LIBRARY}
                        ${ssl_LIBS})
 
 set_target_properties (qpidclient PROPERTIES
@@ -1090,7 +1089,7 @@ set (qpidmessaging_SOURCES
 add_msvc_version (qpidmessaging library dll)
 
 add_library (qpidmessaging SHARED ${qpidmessaging_SOURCES})
-target_link_libraries (qpidmessaging qpidtypes qpidclient qpidcommon "${Boost_PROGRAM_OPTIONS_LIBRARY}"
${Proton_LIBRARIES})
+target_link_libraries (qpidmessaging qpidtypes qpidclient qpidcommon ${Proton_LIBRARIES})
 set_target_properties (qpidmessaging PROPERTIES
                        LINK_FLAGS "${HIDE_SYMBOL_FLAGS} ${LINK_VERSION_SCRIPT_FLAG}"
                        COMPILE_FLAGS "${HIDE_SYMBOL_FLAGS}"
@@ -1224,7 +1223,6 @@ add_msvc_version (qpidbroker library dll
 add_library (qpidbroker SHARED ${qpidbroker_SOURCES})
 
 target_link_libraries (qpidbroker qpidcommon qpidtypes
-                       "${Boost_PROGRAM_OPTIONS_LIBRARY}"
                        "${sasl_LIB}"
                        ${ssl_server_LIBS})
 
@@ -1251,7 +1249,7 @@ set (qpidd_SOURCES
 )
 add_msvc_version (qpidd application exe)
 add_executable (qpidd ${qpidd_SOURCES})
-target_link_libraries (qpidd qpidbroker qpidcommon ${Boost_PROGRAM_OPTIONS_LIBRARY})
+target_link_libraries (qpidd qpidbroker qpidcommon)
 set_target_properties (qpidd PROPERTIES COMPILE_DEFINITIONS _IN_QPID_BROKER)
 install (TARGETS qpidd
          RUNTIME DESTINATION ${QPID_INSTALL_SBINDIR}

Modified: qpid/trunk/qpid/cpp/src/amqp.cmake
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/amqp.cmake?rev=1602021&r1=1602020&r2=1602021&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/amqp.cmake (original)
+++ qpid/trunk/qpid/cpp/src/amqp.cmake Wed Jun 11 21:35:09 2014
@@ -101,7 +101,7 @@ if (BUILD_AMQP)
     include_directories(${Proton_INCLUDE_DIRS})
 
     add_library (amqp MODULE ${amqp_SOURCES})
-    target_link_libraries (amqp qpidtypes qpidbroker qpidcommon ${Proton_LIBRARIES} ${Boost_PROGRAM_OPTIONS_LIBRARY})
+    target_link_libraries (amqp qpidtypes qpidbroker qpidcommon ${Proton_LIBRARIES})
     set_target_properties (amqp PROPERTIES
                            PREFIX ""
                            LINK_FLAGS "${CATCH_UNDEFINED}"

Modified: qpid/trunk/qpid/cpp/src/legacystore.cmake
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/legacystore.cmake?rev=1602021&r1=1602020&r2=1602021&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/legacystore.cmake (original)
+++ qpid/trunk/qpid/cpp/src/legacystore.cmake Wed Jun 11 21:35:09 2014
@@ -160,7 +160,6 @@ if (BUILD_LEGACYSTORE)
         aio
         uuid
         qpidcommon qpidtypes qpidbroker
-        ${Boost_PROGRAM_OPTIONS_LIBRARY}
         ${DB_LIBRARY}
     )
 

Modified: qpid/trunk/qpid/cpp/src/qpid/Options.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/Options.cpp?rev=1602021&r1=1602020&r2=1602021&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/Options.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/Options.cpp Wed Jun 11 21:35:09 2014
@@ -16,9 +16,11 @@
  *
  */
 
-#include "qpid/log/Logger.h"
 #include "qpid/Options.h"
+#include "qpid/OptionsTemplates.h"
 #include "qpid/Exception.h"
+#include "qpid/log/Logger.h"
+#include "qpid/sys/Time.h"
 
 #include <boost/bind.hpp>
 
@@ -135,19 +137,44 @@ struct EnvOptMapper {
 };
 
 }
+
+template QPID_COMMON_EXTERN po::value_semantic* create_value(bool& val, const std::string&
arg);
+template QPID_COMMON_EXTERN po::value_semantic* create_value(int16_t& val, const std::string&
arg);
+template QPID_COMMON_EXTERN po::value_semantic* create_value(int32_t& val, const std::string&
arg);
+template QPID_COMMON_EXTERN po::value_semantic* create_value(int64_t& val, const std::string&
arg);
+template QPID_COMMON_EXTERN po::value_semantic* create_value(uint16_t& val, const std::string&
arg);
+template QPID_COMMON_EXTERN po::value_semantic* create_value(uint32_t& val, const std::string&
arg);
+template QPID_COMMON_EXTERN po::value_semantic* create_value(uint64_t& val, const std::string&
arg);
+template QPID_COMMON_EXTERN po::value_semantic* create_value(double& val, const std::string&
arg);
+
+template QPID_COMMON_EXTERN po::value_semantic* create_value(string& val, const std::string&
arg);
+template QPID_COMMON_EXTERN po::value_semantic* create_value(vector<string>& val,
const std::string& arg);
+template QPID_COMMON_EXTERN po::value_semantic* create_value(vector<int>& val,
const std::string& arg);
+
+template QPID_COMMON_EXTERN po::value_semantic* create_value(sys::Duration& val, const
std::string& arg);
+
+
+po::value_semantic* optValue(bool& value) {
+#if (BOOST_VERSION >= 103500)
+    return create_value(value, "", true);
+#else
+    return po::bool_switch(&value);
+#endif
+}
+
+po::value_semantic* pure_switch(bool& value) {
+    return po::bool_switch(&value);
+}
+
 std::string prettyArg(const std::string& name, const std::string& value) {
     return value.empty() ? name+" " : name+" ("+value+") ";
 }
 
 Options::Options(const string& name) :
-  po::options_description(name)
+  poOptions(new po::options_description(name))
 {
 }
 
-
-
-
-
 void Options::parse(int argc, char const* const* argv, const std::string& configFile,
bool allowUnknown)
 {
     string defaultConfigFile = configFile; // May be changed by env/cmdline
@@ -160,7 +187,7 @@ void Options::parse(int argc, char const
                 // This hideous workaround is required because boost 1.33 has a bug
                 // that causes 'allow_unregistered' to not work.
                 po::command_line_parser clp = po::command_line_parser(argc, const_cast<char**>(argv)).
-                    options(*this).allow_unregistered();
+                    options(*poOptions).allow_unregistered();
                 po::parsed_options opts     = clp.run();
                 po::parsed_options filtopts = clp.run();
                 filtopts.options.clear ();
@@ -172,10 +199,10 @@ void Options::parse(int argc, char const
 
             }
             else
-                po::store(po::parse_command_line(argc, const_cast<char**>(argv), *this),
vm);
+                po::store(po::parse_command_line(argc, const_cast<char**>(argv), *poOptions),
vm);
         }
         parsing="environment variables";
-        po::store(po::parse_environment(*this, EnvOptMapper(*this)), vm);
+        po::store(po::parse_environment(*poOptions, EnvOptMapper(*this)), vm);
         po::notify(vm); // configFile may be updated from arg/env options.
         if (!configFile.empty()) {
             parsing="configuration file "+configFile;
@@ -193,7 +220,7 @@ void Options::parse(int argc, char const
                     filtered << mapper.configFileLine (line, allowUnknown);
                 }
 
-                po::store(po::parse_config_file(filtered, *this), vm);
+                po::store(po::parse_config_file(filtered, *poOptions), vm);
                 // End of hack
             }
             else {
@@ -219,17 +246,29 @@ void Options::parse(int argc, char const
     }
 }
 
-CommonOptions::CommonOptions(const string& name, const string& configfile, const
string& clientfile)
-    : Options(name), config(configfile), clientConfig(clientfile)
+options_description_easy_init::options_description_easy_init(po::options_description* o)
:
+    owner(o)
+{}
+
+options_description_easy_init Options::addOptions()
 {
-    addOptions()
-        ("help,h", optValue(help), "Displays the help message")
-        ("version,v", optValue(version), "Displays version information")
-        ("config", optValue(config, "FILE"), "Reads configuration from FILE")
-        ("client-config", optValue(clientConfig, "FILE"), "Reads client configuration from
FILE (for cluster interconnect)");
+    return options_description_easy_init(poOptions.get());
+}
+
+void Options::add(Options& o)
+{
+    poOptions->add(*o.poOptions);
 }
 
+const std::vector< boost::shared_ptr<po::option_description> >& Options::options()
const
+{
+    return poOptions->options();
+}
 
+bool Options::find_nothrow(const std::string& s, bool b)
+{
+    return poOptions->find_nothrow(s, b);
+}
 
 bool Options::findArg(int argc, char const* const* argv, const std::string& theArg)
 {
@@ -238,7 +277,7 @@ bool Options::findArg(int argc, char con
     try {
         if (argc > 0 && argv != 0) {
             po::command_line_parser clp = po::command_line_parser(argc, const_cast<char**>(argv)).
-            options(*this).allow_unregistered();
+            options(*poOptions).allow_unregistered();
             po::parsed_options opts     = clp.run();
 
             for (std::vector< po::basic_option<char> >::iterator
@@ -258,5 +297,35 @@ bool Options::findArg(int argc, char con
     }
 }
 
+void Options::print(ostream& os)
+{
+    poOptions->print(os);
+}
+
+std::ostream& operator<<(std::ostream& os, const Options& options)
+{
+    return os << *(options.poOptions);
+}
+
+options_description_easy_init&
+options_description_easy_init::operator()(const char* name,
+           const po::value_semantic* s,
+           const char* description)
+{
+    owner->add(boost::shared_ptr<po::option_description>(new po::option_description(name,
s, description)));
+    return *this;
+}
+
+
+CommonOptions::CommonOptions(const string& name, const string& configfile, const
string& clientfile)
+: Options(name), config(configfile), clientConfig(clientfile)
+{
+    addOptions()
+    ("help,h", optValue(help), "Displays the help message")
+    ("version,v", optValue(version), "Displays version information")
+    ("config", optValue(config, "FILE"), "Reads configuration from FILE")
+    ("client-config", optValue(clientConfig, "FILE"), "Reads client configuration from FILE
(for cluster interconnect)");
+}
+
 } // namespace qpid
 

Modified: qpid/trunk/qpid/cpp/src/qpid/Options.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/Options.h?rev=1602021&r1=1602020&r2=1602021&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/Options.h (original)
+++ qpid/trunk/qpid/cpp/src/qpid/Options.h Wed Jun 11 21:35:09 2014
@@ -30,8 +30,8 @@
 #  pragma warning(disable : 4251 4275)
 #endif
 
-#include <boost/program_options.hpp>
-#include <boost/format.hpp>
+#include <boost/lexical_cast.hpp>
+#include <boost/shared_ptr.hpp>
 
 #ifdef _MSC_VER
 #  pragma warning(pop)
@@ -41,8 +41,18 @@
 #include <iterator>
 #include <algorithm>
 #include <string>
+#include <vector>
+#include <iosfwd>
+
 #include "qpid/CommonImportExport.h"
 
+namespace boost {
+namespace program_options {
+class value_semantic;
+class option_description;
+class options_description;
+}}
+
 namespace qpid {
 namespace po=boost::program_options;
 
@@ -51,18 +61,9 @@ namespace po=boost::program_options;
 ///@internal
 QPID_COMMON_EXTERN std::string prettyArg(const std::string&, const std::string&);
 
-/** @internal Normally only constructed by optValue() */
+///@internal
 template <class T>
-class OptionValue : public po::typed_value<T> {
-  public:
-    OptionValue(T& value, const std::string& arg)
-        : po::typed_value<T>(&value), argName(arg) {}
-    std::string name() const { return argName; }
-
-  private:
-    std::string argName;
-};
-
+QPID_COMMON_EXTERN po::value_semantic* create_value(T& val, const std::string& arg);
 
 /** Create an option value.
  * name, value appear after the option name in help like this:
@@ -73,7 +74,7 @@ class OptionValue : public po::typed_val
 template<class T>
 po::value_semantic* optValue(T& value, const char* name) {
     std::string valstr(boost::lexical_cast<std::string>(value));
-    return new OptionValue<T>(value, prettyArg(name, valstr));
+    return create_value(value, prettyArg(name, valstr));
 }
 
 /** Create a vector value. Multiple occurences of the option are
@@ -86,21 +87,12 @@ po::value_semantic* optValue(std::vector
     std::string val=os.str();
     if (!val.empty())
         val.erase(val.end()-1); // Remove trailing " "
-    return (new OptionValue<std::vector<T> >(value, prettyArg(name, val)));
+    return create_value(value, prettyArg(name, val));
 }
 
 /** Create a boolean switch value. Presence of the option sets the value. */
-inline po::value_semantic* optValue(bool& value) {
-#if (BOOST_VERSION >= 103500)
-    return (new OptionValue<bool>(value, ""))->implicit_value(true);
-#else
-    return po::bool_switch(&value);
-#endif
-}
-
-inline po::value_semantic* pure_switch(bool& value) {
-    return po::bool_switch(&value);
-}
+QPID_COMMON_EXTERN po::value_semantic* optValue(bool& value);
+QPID_COMMON_EXTERN po::value_semantic* pure_switch(bool& value);
 
 /**
  * Base class for options.
@@ -140,9 +132,22 @@ inline po::value_semantic* pure_switch(b
  */
 
 
+class options_description_easy_init {
+public:
+    QPID_COMMON_EXTERN options_description_easy_init(po::options_description* o);
+
+    QPID_COMMON_EXTERN options_description_easy_init&
+    operator()(const char* name,
+               const po::value_semantic* s,
+               const char* description);
 
+private:
+    po::options_description* owner;
+};
 
-struct Options : public po::options_description {
+
+struct Options {
+    friend QPID_COMMON_EXTERN std::ostream& operator<<(std::ostream& os, const
Options&);
 
     struct Exception : public qpid::Exception {
         Exception(const std::string& msg) : qpid::Exception(msg) {}
@@ -165,12 +170,17 @@ struct Options : public po::options_desc
     QPID_COMMON_EXTERN bool findArg(int argc, char const* const* argv,
                                        const std::string& theArg);
 
-  boost::program_options::options_description_easy_init addOptions() {
-      return add_options();
-  }
-};
+    QPID_COMMON_EXTERN options_description_easy_init addOptions();
+    QPID_COMMON_EXTERN void add(Options&);
+    QPID_COMMON_EXTERN const std::vector< boost::shared_ptr<po::option_description>
>& options() const;
+    QPID_COMMON_EXTERN bool find_nothrow(const std::string&, bool);
+    QPID_COMMON_EXTERN void print(std::ostream& os);
 
+private:
+    boost::shared_ptr<po::options_description> poOptions;
+};
 
+QPID_COMMON_EXTERN std::ostream& operator<<(std::ostream& os, const Options&);
 
 /**
  * Standard options for configuration

Added: qpid/trunk/qpid/cpp/src/qpid/OptionsTemplates.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/OptionsTemplates.h?rev=1602021&view=auto
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/OptionsTemplates.h (added)
+++ qpid/trunk/qpid/cpp/src/qpid/OptionsTemplates.h Wed Jun 11 21:35:09 2014
@@ -0,0 +1,52 @@
+/*
+ *
+ * Copyright (c) 2006 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#include <boost/program_options.hpp>
+
+#include <string>
+
+#include "qpid/CommonImportExport.h"
+
+namespace qpid {
+
+namespace po=boost::program_options;
+
+template <class T>
+class OptValue : public po::typed_value<T> {
+public:
+  OptValue(T& val, const std::string& arg) :
+      po::typed_value<T>(&val),
+      argName(arg)
+  {}
+  std::string name() const { return argName; }
+
+private:
+  std::string argName;
+};
+
+template <class T>
+po::value_semantic* create_value(T& val, const std::string& arg) {
+    return new OptValue<T>(val, arg);
+}
+
+template <class T>
+po::value_semantic* create_value(T& val, const std::string& arg, const T& implicit_val)
{
+  return (new OptValue<T>(val, arg))->implicit_value(implicit_val);
+}
+
+}

Modified: qpid/trunk/qpid/cpp/src/qpid/broker/Broker.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/broker/Broker.cpp?rev=1602021&r1=1602020&r2=1602021&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/broker/Broker.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/broker/Broker.cpp Wed Jun 11 21:35:09 2014
@@ -66,7 +66,6 @@
 #include "qpid/log/Logger.h"
 #include "qpid/log/Options.h"
 #include "qpid/log/Statement.h"
-#include "qpid/log/posix/SinkOptions.h"
 #include "qpid/framing/AMQFrame.h"
 #include "qpid/framing/FieldTable.h"
 #include "qpid/framing/ProtocolInitiation.h"

Modified: qpid/trunk/qpid/cpp/src/qpid/ha/HaPlugin.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/ha/HaPlugin.cpp?rev=1602021&r1=1602020&r2=1602021&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/ha/HaPlugin.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/ha/HaPlugin.cpp Wed Jun 11 21:35:09 2014
@@ -19,10 +19,14 @@
 #include "Settings.h"
 #include "qpid/Plugin.h"
 #include "qpid/Options.h"
+#include "qpid/OptionsTemplates.h"
 #include "qpid/broker/Broker.h"
 #include <boost/bind.hpp>
 
 namespace qpid {
+
+template po::value_semantic* create_value(ha::Enum<ha::ReplicateLevel>& val, const
std::string& arg);
+
 namespace ha {
 
 using namespace std;

Modified: qpid/trunk/qpid/cpp/src/qpid/log/posix/SinkOptions.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/log/posix/SinkOptions.cpp?rev=1602021&r1=1602020&r2=1602021&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/log/posix/SinkOptions.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/log/posix/SinkOptions.cpp Wed Jun 11 21:35:09 2014
@@ -20,6 +20,7 @@
 #include "qpid/log/SinkOptions.h"
 #include "qpid/log/Logger.h"
 #include "qpid/log/OstreamOutput.h"
+#include "qpid/OptionsTemplates.h"
 #include "qpid/memory.h"
 #include "qpid/Exception.h"
 
@@ -34,6 +35,9 @@ using std::string;
 using qpid::Exception;
 
 namespace qpid {
+
+template po::value_semantic* create_value(log::posix::SyslogFacility& val, const std::string&
arg);
+
 namespace log {
 namespace posix {
 

Modified: qpid/trunk/qpid/cpp/src/qpid/store/CMakeLists.txt
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/store/CMakeLists.txt?rev=1602021&r1=1602020&r2=1602021&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/store/CMakeLists.txt (original)
+++ qpid/trunk/qpid/cpp/src/qpid/store/CMakeLists.txt Wed Jun 11 21:35:09 2014
@@ -26,13 +26,11 @@ include_directories( ${Boost_INCLUDE_DIR
 include_directories( ${CMAKE_CURRENT_SOURCE_DIR} )
 include_directories( ${CMAKE_HOME_DIRECTORY}/include )
 
-link_directories( ${Boost_LIBRARY_DIRS} )
-
 set (store_SOURCES
      MessageStorePlugin.cpp
     )
 add_library (store MODULE ${store_SOURCES})
-target_link_libraries (store qpidbroker qpidcommon ${Boost_PROGRAM_OPTIONS_LIBRARY})
+target_link_libraries (store qpidbroker qpidcommon)
 if (CMAKE_COMPILER_IS_GNUCXX)
   set (GCC_CATCH_UNDEFINED "-Wl,--no-undefined")
   # gcc on SunOS uses native linker whose "-z defs" is too fussy
@@ -85,7 +83,7 @@ if (BUILD_MSSQL)
                ms-sql/TplRecordset.cpp
                ms-sql/VariantHelper.cpp)
   set_target_properties (mssql_store PROPERTIES COMPILE_DEFINITIONS _IN_QPID_BROKER)
-  target_link_libraries (mssql_store qpidbroker qpidcommon ${Boost_PROGRAM_OPTIONS_LIBRARY})
+  target_link_libraries (mssql_store qpidbroker qpidcommon)
   install (TARGETS mssql_store # RUNTIME
            DESTINATION ${QPIDD_MODULE_DIR}
            COMPONENT ${QPID_COMPONENT_BROKER})
@@ -115,7 +113,7 @@ if (BUILD_MSCLFS)
                ms-sql/VariantHelper.cpp)
   include_directories(ms-sql)
   set_target_properties (msclfs_store PROPERTIES COMPILE_DEFINITIONS _IN_QPID_BROKER)
-  target_link_libraries (msclfs_store qpidbroker qpidcommon ${Boost_PROGRAM_OPTIONS_LIBRARY}
clfsw32.lib)
+  target_link_libraries (msclfs_store qpidbroker qpidcommon clfsw32.lib)
   install (TARGETS msclfs_store # RUNTIME
            DESTINATION ${QPIDD_MODULE_DIR}
            COMPONENT ${QPID_COMPONENT_BROKER})

Modified: qpid/trunk/qpid/cpp/src/tests/CMakeLists.txt
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/CMakeLists.txt?rev=1602021&r1=1602020&r2=1602021&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/CMakeLists.txt (original)
+++ qpid/trunk/qpid/cpp/src/tests/CMakeLists.txt Wed Jun 11 21:35:09 2014
@@ -61,11 +61,11 @@ endif (CMAKE_SYSTEM_NAME STREQUAL Window
 
 # Some generally useful utilities that just happen to be built in the test area
 add_executable (qpid-receive qpid-receive.cpp Statistics.cpp ${platform_test_additions})
-target_link_libraries (qpid-receive qpidmessaging qpidtypes qpidcommon "${Boost_PROGRAM_OPTIONS_LIBRARY}")
+target_link_libraries (qpid-receive qpidmessaging qpidtypes qpidcommon)
 remember_location(qpid-receive)
 
 add_executable (qpid-send qpid-send.cpp Statistics.cpp ${platform_test_additions})
-target_link_libraries (qpid-send qpidmessaging qpidtypes qpidcommon "${Boost_PROGRAM_OPTIONS_LIBRARY}")
+target_link_libraries (qpid-send qpidmessaging qpidtypes qpidcommon)
 remember_location(qpid-send)
 
 install (TARGETS
@@ -73,40 +73,40 @@ install (TARGETS
          RUNTIME DESTINATION ${QPID_INSTALL_BINDIR})
 
 add_executable (qpid-perftest qpid-perftest.cpp ${platform_test_additions})
-target_link_libraries (qpid-perftest qpidclient qpidcommon "${Boost_PROGRAM_OPTIONS_LIBRARY}")
+target_link_libraries (qpid-perftest qpidclient qpidcommon ${Boost_PROGRAM_OPTIONS_LIBRARY})
 remember_location(qpid-perftest)
 
 add_executable (qpid-latency-test qpid-latency-test.cpp ${platform_test_additions})
-target_link_libraries (qpid-latency-test qpidclient qpidcommon "${Boost_PROGRAM_OPTIONS_LIBRARY}")
+target_link_libraries (qpid-latency-test qpidclient qpidcommon)
 remember_location(qpid-latency-test)
 
 add_executable (qpid-client-test qpid-client-test.cpp ${platform_test_additions})
-target_link_libraries (qpid-client-test qpidclient qpidcommon "${Boost_PROGRAM_OPTIONS_LIBRARY}")
+target_link_libraries (qpid-client-test qpidclient qpidcommon)
 remember_location(qpid-client-test)
 
 add_executable (qpid-ping qpid-ping.cpp ${platform_test_additions})
-target_link_libraries (qpid-ping qpidmessaging qpidtypes qpidcommon "${Boost_PROGRAM_OPTIONS_LIBRARY}")
+target_link_libraries (qpid-ping qpidmessaging qpidtypes qpidcommon)
 remember_location(qpid-ping)
 
 add_executable (qpid-topic-listener qpid-topic-listener.cpp ${platform_test_additions})
-target_link_libraries (qpid-topic-listener qpidclient qpidcommon "${Boost_PROGRAM_OPTIONS_LIBRARY}")
+target_link_libraries (qpid-topic-listener qpidclient qpidcommon)
 remember_location(qpid-topic-listener)
 
 add_executable (qpid-topic-publisher qpid-topic-publisher.cpp ${platform_test_additions})
-target_link_libraries (qpid-topic-publisher qpidclient qpidcommon "${Boost_PROGRAM_OPTIONS_LIBRARY}")
+target_link_libraries (qpid-topic-publisher qpidclient qpidcommon)
 remember_location(qpid-topic-publisher)
 
 add_executable (receiver receiver.cpp ${platform_test_additions})
-target_link_libraries (receiver qpidclient qpidcommon "${Boost_PROGRAM_OPTIONS_LIBRARY}")
+target_link_libraries (receiver qpidclient qpidcommon)
 remember_location(receiver)
 
 # This is bizarre - using both messaging and client libraries
 add_executable (sender sender.cpp Statistics.cpp ${platform_test_additions})
-target_link_libraries (sender qpidmessaging qpidtypes qpidclient qpidcommon "${Boost_PROGRAM_OPTIONS_LIBRARY}")
+target_link_libraries (sender qpidmessaging qpidtypes qpidclient qpidcommon)
 remember_location(sender)
 
 add_executable (qpid-txtest qpid-txtest.cpp ${platform_test_additions})
-target_link_libraries (qpid-txtest qpidclient qpidcommon qpidtypes "${Boost_PROGRAM_OPTIONS_LIBRARY}")
+target_link_libraries (qpid-txtest qpidclient qpidcommon qpidtypes)
 #qpid_txtest_SOURCES=qpid-txtest.cpp  TestOptions.h ConnectionOptions.h
 remember_location(qpid-txtest)
 
@@ -232,7 +232,7 @@ add_executable (unit_test unit_test
                 ${actual_unit_tests} ${platform_test_additions})
 target_link_libraries (unit_test
                        ${qpid_test_boost_libs}
-                       qpidmessaging qpidtypes qpidbroker qpidclient qpidcommon "${Boost_PROGRAM_OPTIONS_LIBRARY}")
+                       qpidmessaging qpidtypes qpidbroker qpidclient qpidcommon)
 set_target_properties (unit_test PROPERTIES COMPILE_DEFINITIONS _IN_QPID_BROKER)
 remember_location(unit_test)
 
@@ -256,19 +256,19 @@ endif (BUILD_SASL)
 # Other test programs
 #
 add_executable (echotest echotest.cpp ${platform_test_additions})
-target_link_libraries (echotest qpidclient qpidcommon "${Boost_PROGRAM_OPTIONS_LIBRARY}")
+target_link_libraries (echotest qpidclient qpidcommon)
 remember_location(echotest)
 
 add_executable (publish publish.cpp ${platform_test_additions})
-target_link_libraries (publish qpidclient qpidcommon "${Boost_PROGRAM_OPTIONS_LIBRARY}")
+target_link_libraries (publish qpidclient qpidcommon)
 remember_location(publish)
 
 add_executable (consume consume.cpp ${platform_test_additions})
-target_link_libraries (consume qpidclient qpidcommon "${Boost_PROGRAM_OPTIONS_LIBRARY}")
+target_link_libraries (consume qpidclient qpidcommon)
 remember_location(consume)
 
 add_executable (header_test header_test.cpp ${platform_test_additions})
-target_link_libraries (header_test qpidclient qpidcommon "${Boost_PROGRAM_OPTIONS_LIBRARY}")
+target_link_libraries (header_test qpidclient qpidcommon)
 remember_location(header_test)
 
 add_executable (declare_queues declare_queues.cpp ${platform_test_additions})
@@ -276,31 +276,31 @@ target_link_libraries (declare_queues qp
 remember_location(declare_queues)
 
 add_executable (replaying_sender replaying_sender.cpp ${platform_test_additions})
-target_link_libraries (replaying_sender qpidclient qpidcommon "${Boost_PROGRAM_OPTIONS_LIBRARY}")
+target_link_libraries (replaying_sender qpidclient qpidcommon)
 remember_location(replaying_sender)
 
 add_executable (resuming_receiver resuming_receiver.cpp ${platform_test_additions})
-target_link_libraries (resuming_receiver qpidclient qpidcommon "${Boost_PROGRAM_OPTIONS_LIBRARY}")
+target_link_libraries (resuming_receiver qpidclient qpidcommon)
 remember_location(resuming_receiver)
 
 add_executable (txshift txshift.cpp ${platform_test_additions})
-target_link_libraries (txshift qpidclient qpidcommon "${Boost_PROGRAM_OPTIONS_LIBRARY}")
+target_link_libraries (txshift qpidclient qpidcommon)
 remember_location(txshift)
 
 add_executable (txjob txjob.cpp ${platform_test_additions})
-target_link_libraries (txjob qpidclient qpidcommon "${Boost_PROGRAM_OPTIONS_LIBRARY}")
+target_link_libraries (txjob qpidclient qpidcommon)
 remember_location(txjob)
 
 add_executable (datagen datagen.cpp ${platform_test_additions})
-target_link_libraries (datagen qpidclient qpidcommon "${Boost_PROGRAM_OPTIONS_LIBRARY}")
+target_link_libraries (datagen qpidclient qpidcommon)
 remember_location(datagen)
 
 add_executable (msg_group_test msg_group_test.cpp ${platform_test_additions})
-target_link_libraries (msg_group_test qpidmessaging qpidtypes qpidcommon "${Boost_PROGRAM_OPTIONS_LIBRARY}")
+target_link_libraries (msg_group_test qpidmessaging qpidtypes qpidcommon)
 remember_location(msg_group_test)
 
 add_executable (ha_test_max_queues ha_test_max_queues.cpp ${platform_test_additions})
-target_link_libraries (ha_test_max_queues qpidclient qpidcommon "${Boost_PROGRAM_OPTIONS_LIBRARY}")
+target_link_libraries (ha_test_max_queues qpidclient qpidcommon)
 remember_location(ha_test_max_queues)
 
 if (BUILD_SASL)

Modified: qpid/trunk/qpid/cpp/src/tests/qpid-perftest.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/qpid-perftest.cpp?rev=1602021&r1=1602020&r2=1602021&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/qpid-perftest.cpp (original)
+++ qpid/trunk/qpid/cpp/src/tests/qpid-perftest.cpp Wed Jun 11 21:35:09 2014
@@ -20,7 +20,7 @@
  */
 
 #include "TestOptions.h"
-
+#include "qpid/OptionsTemplates.h"
 #include "qpid/client/AsyncSession.h"
 #include "qpid/client/SubscriptionManager.h"
 #include "qpid/client/Connection.h"
@@ -69,7 +69,6 @@ ostream& operator<<(ostream& out, Mode m
     return out << modeNames[mode];
 }
 
-
 struct Opts : public TestOptions {
 
     // Actions
@@ -683,7 +682,11 @@ struct SubscribeThread : public Client {
     }
 };
 
-}} // namespace qpid::tests
+}
+
+template po::value_semantic* create_value(tests::Mode& val, const std::string& arg);
+
+} // namespace qpid::tests
 
 using namespace qpid::tests;
 

Modified: qpid/trunk/qpid/cpp/src/tests/test_tools.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/test_tools.h?rev=1602021&r1=1602020&r2=1602021&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/test_tools.h (original)
+++ qpid/trunk/qpid/cpp/src/tests/test_tools.h Wed Jun 11 21:35:09 2014
@@ -28,6 +28,7 @@
 #include <ostream>
 #include <sstream>
 #include <exception>
+#include <stdexcept>
 
 // Print a sequence
 template <class T> std::ostream& seqPrint(std::ostream& o, const T& seq)
{



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message