From de9e2692a0ddfdef4dac98334953019d6887902f Mon Sep 17 00:00:00 2001 From: Andrew Stitcher Date: Tue, 29 Oct 2013 21:24:26 +0000 Subject: QPID-5237: Self-contained C++ source distribution git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1536900 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/cpp/BuildInstallSettings.cmake | 15 +- qpid/cpp/CMakeLists.txt | 19 +- qpid/cpp/specs/amqp.0-10-qpid-errata.stripped.xml | 1203 +++++++++++++++++++++ qpid/cpp/src/CMakeLists.txt | 123 ++- qpid/cpp/src/qpid/broker/management-schema.xml | 597 ++++++++++ 5 files changed, 1878 insertions(+), 79 deletions(-) create mode 100644 qpid/cpp/specs/amqp.0-10-qpid-errata.stripped.xml create mode 100644 qpid/cpp/src/qpid/broker/management-schema.xml (limited to 'qpid/cpp') diff --git a/qpid/cpp/BuildInstallSettings.cmake b/qpid/cpp/BuildInstallSettings.cmake index eaa65f78ef..a980c81e8f 100644 --- a/qpid/cpp/BuildInstallSettings.cmake +++ b/qpid/cpp/BuildInstallSettings.cmake @@ -20,19 +20,6 @@ # Settings related to the Qpid build and install CMake/CTest/CPack procedure. # These are used by both the C++ and WCF components. -# Parse the version from QPID_VERSION.txt. -# Use the top level qpid/ file if we're in an SVN checkout, source dir otherwise. -if(EXISTS "${PROJECT_SOURCE_DIR}/../QPID_VERSION.txt") - file(READ "${PROJECT_SOURCE_DIR}/../QPID_VERSION.txt" QPID_VERSION) -elseif (EXISTS "${PROJECT_SOURCE_DIR}/QPID_VERSION.txt") - file(READ "${PROJECT_SOURCE_DIR}/QPID_VERSION.txt" QPID_VERSION) -else() - message(FATAL_ERROR "Cannot find QPID_VERSION.txt") -endif(EXISTS "${PROJECT_SOURCE_DIR}/../QPID_VERSION.txt") -string(REGEX REPLACE "^([0-9]+)\\.([0-9]+)\n" "\\1" QPID_VERSION_MAJOR "${QPID_VERSION}") -string(REGEX REPLACE "^([0-9]+)\\.([0-9]+)\n" "\\2" QPID_VERSION_MINOR "${QPID_VERSION}") -set (QPID_VERSION_FULL "${QPID_VERSION_MAJOR}.${QPID_VERSION_MINOR}") - # When doing installs, there are a number of components that the item can # be associated with. Since there may be different sets of components desired # for the various platforms, the component names are defined here. When @@ -155,7 +142,7 @@ if (UNIX) set (SHARE_INSTALL_DIR share CACHE PATH "Shared read only data directory") set (DOC_INSTALL_DIR ${SHARE_INSTALL_DIR}/doc/${CMAKE_PROJECT_NAME}-${QPID_VERSION_FULL} CACHE PATH "Shared read only data directory") mark_as_advanced(INCLUDE_INSTALL_DIR LIB_INSTALL_DIR SYSCONF_INSTALL_DIR SHARE_INSTALL_DIR DOC_INSTALL_DIR) - + set (QPID_COMPONENT_BROKER runtime) set (QPID_COMPONENT_CLIENT runtime) set (QPID_COMPONENT_COMMON runtime) diff --git a/qpid/cpp/CMakeLists.txt b/qpid/cpp/CMakeLists.txt index ad9d17aeaa..837a71cd44 100644 --- a/qpid/cpp/CMakeLists.txt +++ b/qpid/cpp/CMakeLists.txt @@ -23,15 +23,28 @@ if(COMMAND cmake_policy) cmake_policy(VERSION 2.6) endif(COMMAND cmake_policy) -include(BuildInstallSettings.cmake) - if (${CMAKE_VERSION} VERSION_LESS "2.8.0") set (OPTIONAL_ARG "") else() set (OPTIONAL_ARG OPTIONAL) endif() -set (qpidc_version ${QPID_VERSION_MAJOR}.${QPID_VERSION_MINOR}) +# Parse the version from QPID_VERSION.txt. +# Use the top level qpid/ file if we're in an SVN checkout, source dir otherwise. +find_file(QPID_VERSION_FILE NAMES QPID_VERSION.txt PATHS ${PROJECT_SOURCE_DIR}/.. ${PROJECT_SOURCE_DIR} NO_DEFAULT_PATH) +mark_as_advanced(QPID_VERSION_FILE) +if(NOT QPID_VERSION_FILE) + message(FATAL_ERROR "Cannot find QPID_VERSION.txt") +endif(NOT QPID_VERSION_FILE) + +file(READ ${QPID_VERSION_FILE} QPID_VERSION) +string(REGEX REPLACE "^([0-9]+)\\.([0-9]+)\n" "\\1" QPID_VERSION_MAJOR "${QPID_VERSION}") +string(REGEX REPLACE "^([0-9]+)\\.([0-9]+)\n" "\\2" QPID_VERSION_MINOR "${QPID_VERSION}") +set (QPID_VERSION_FULL "${QPID_VERSION_MAJOR}.${QPID_VERSION_MINOR}") + +set (qpidc_version ${QPID_VERSION_FULL}) + +include(BuildInstallSettings.cmake) enable_testing() include (CTest) diff --git a/qpid/cpp/specs/amqp.0-10-qpid-errata.stripped.xml b/qpid/cpp/specs/amqp.0-10-qpid-errata.stripped.xml new file mode 100644 index 0000000000..83ddf709e9 --- /dev/null +++ b/qpid/cpp/specs/amqp.0-10-qpid-errata.stripped.xml @@ -0,0 +1,1203 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ + + + + + + +
+ +
+ +
+
+ + + + + + + + + +
+ +
+ +
+
+
+
diff --git a/qpid/cpp/src/CMakeLists.txt b/qpid/cpp/src/CMakeLists.txt index 9e656243fe..19e70eb549 100644 --- a/qpid/cpp/src/CMakeLists.txt +++ b/qpid/cpp/src/CMakeLists.txt @@ -81,68 +81,67 @@ ENDMACRO (add_api_test libname) # rubygen subdir is excluded from stable distributions # If the main AMQP spec is present, then check if ruby and python are # present, and if any sources have changed, forcing a re-gen of source code. - -set(AMQP_SPEC_DIR ${qpid-cpp_SOURCE_DIR}/../specs) -set(AMQP_SPEC ${AMQP_SPEC_DIR}/amqp.0-10-qpid-errata.stripped.xml) -if (EXISTS ${AMQP_SPEC}) - if (NOT RUBY_EXECUTABLE) - message(FATAL_ERROR "Can't locate ruby, needed to generate source files.") - endif (NOT RUBY_EXECUTABLE) - if (NOT PYTHON_EXECUTABLE) - message(FATAL_ERROR "Can't locate python, needed to generate source files.") - endif (NOT PYTHON_EXECUTABLE) - - set(specs ${AMQP_SPEC}) - set(regen_amqp OFF) - set(rgen_dir ${qpid-cpp_SOURCE_DIR}/rubygen) - file(GLOB_RECURSE rgen_progs ${rgen_dir}/*.rb) - # If any of the specs, or any of the sources used to generate code, change - # then regenerate the sources. - foreach (spec_file ${specs} ${rgen_progs}) - if (${spec_file} IS_NEWER_THAN ${CMAKE_CURRENT_BINARY_DIR}/rubygen.cmake) - set(regen_amqp ON) - endif (${spec_file} IS_NEWER_THAN ${CMAKE_CURRENT_BINARY_DIR}/rubygen.cmake) - endforeach (spec_file ${specs}) - if (regen_amqp) - message(STATUS "Regenerating AMQP protocol sources") -execute_process(COMMAND ${RUBY_EXECUTABLE} -I ${rgen_dir} ${rgen_dir}/generate ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}/../include ${specs} all rubygen.cmake - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) - else (regen_amqp) - message(STATUS "No need to generate AMQP protocol sources") - endif (regen_amqp) - - set(mgmt_specs ${AMQP_SPEC_DIR}/management-schema.xml - ${CMAKE_CURRENT_SOURCE_DIR}/qpid/acl/management-schema.xml - ${CMAKE_CURRENT_SOURCE_DIR}/qpid/ha/management-schema.xml - ${CMAKE_CURRENT_SOURCE_DIR}/qpid/legacystore/management-schema.xml - ${CMAKE_CURRENT_SOURCE_DIR}/qpid/linearstore/management-schema.xml - ) - set(mgen_dir ${qpid-cpp_SOURCE_DIR}/managementgen) - set(regen_mgmt OFF) - foreach (spec_file ${mgmt_specs}) - if (${spec_file} IS_NEWER_THAN ${CMAKE_CURRENT_BINARY_DIR}/managementgen.cmake) - message(STATUS "${spec_file} is newer") - set(regen_mgmt ON) - endif (${spec_file} IS_NEWER_THAN ${CMAKE_CURRENT_BINARY_DIR}/managementgen.cmake) - endforeach (spec_file ${mgmt_specs}) - if (regen_mgmt) - message(STATUS "Regenerating Qpid Management Framework sources") -execute_process(COMMAND ${PYTHON_EXECUTABLE} ${mgen_dir}/qmf-gen -c managementgen.cmake -b -l -q -o ${CMAKE_CURRENT_BINARY_DIR}/qmf ${mgmt_specs} - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) - else (regen_mgmt) - message(STATUS "No need to generate Qpid Management Framework sources") - endif (regen_mgmt) - - # Pull in the names of the generated files, i.e. ${rgen_framing_srcs} - include (${CMAKE_CURRENT_BINARY_DIR}/rubygen.cmake) - include (${CMAKE_CURRENT_BINARY_DIR}/managementgen.cmake) - -else (EXISTS ${AMQP_SPEC}) - message(STATUS "No AMQP spec... presume generated sources are included") - set(QPID_GENERATED_HEADERS_IN_SOURCE ON) - include (rubygen.cmake) - include (managementgen.cmake) -endif (EXISTS ${AMQP_SPEC}) +find_file(QPID_AMQP_SPEC NAMES amqp.0-10-qpid-errata.stripped.xml PATHS ${qpid-cpp_SOURCE_DIR}/specs ${qpid-cpp_SOURCE_DIR}/../specs NO_DEFAULT_PATH) +mark_as_advanced(QPID_AMQP_SPEC) +if (NOT QPID_AMQP_SPEC) + message(FATAL_ERROR "Can't find amqp 0-10 spec for framing code generation") +endif (NOT QPID_AMQP_SPEC) +if (NOT RUBY_EXECUTABLE) + message(FATAL_ERROR "Can't locate ruby, needed to generate amqp 0-10 framing code.") +endif (NOT RUBY_EXECUTABLE) + +set(specs ${QPID_AMQP_SPEC}) +set(regen_amqp OFF) +set(rgen_dir ${qpid-cpp_SOURCE_DIR}/rubygen) +file(GLOB_RECURSE rgen_progs ${rgen_dir}/*.rb) +# If any of the specs, or any of the sources used to generate code, change +# then regenerate the sources. +foreach (spec_file ${specs} ${rgen_progs}) + if (${spec_file} IS_NEWER_THAN ${CMAKE_CURRENT_BINARY_DIR}/rubygen.cmake) + set(regen_amqp ON) + endif (${spec_file} IS_NEWER_THAN ${CMAKE_CURRENT_BINARY_DIR}/rubygen.cmake) +endforeach (spec_file ${specs}) +if (regen_amqp) + message(STATUS "Regenerating AMQP protocol sources") + execute_process(COMMAND ${RUBY_EXECUTABLE} -I ${rgen_dir} ${rgen_dir}/generate ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}/../include ${specs} all rubygen.cmake + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) +else (regen_amqp) + message(STATUS "No need to generate AMQP protocol sources") +endif (regen_amqp) + +find_file(QPID_BROKER_MANAGEMENT_SPEC NAMES management-schema.xml PATHS ${CMAKE_CURRENT_SOURCE_DIR}/qpid/broker ${qpid-cpp_SOURCE_DIR}/../specs NO_DEFAULT_PATH) +mark_as_advanced(QPID_BROKER_MANAGEMENT_SPEC) +if (NOT QPID_BROKER_MANAGEMENT_SPEC) + message(FATAL_ERROR "Can't find broker management spec for code generation") +endif (NOT QPID_BROKER_MANAGEMENT_SPEC) +if (NOT PYTHON_EXECUTABLE) + message(FATAL_ERROR "Can't locate python, needed to generate broker management code.") +endif (NOT PYTHON_EXECUTABLE) +set(mgmt_specs ${QPID_BROKER_MANAGEMENT_SPEC} + ${CMAKE_CURRENT_SOURCE_DIR}/qpid/acl/management-schema.xml + ${CMAKE_CURRENT_SOURCE_DIR}/qpid/ha/management-schema.xml + ${CMAKE_CURRENT_SOURCE_DIR}/qpid/legacystore/management-schema.xml + ${CMAKE_CURRENT_SOURCE_DIR}/qpid/linearstore/management-schema.xml +) +set(mgen_dir ${qpid-cpp_SOURCE_DIR}/managementgen) +set(regen_mgmt OFF) +foreach (spec_file ${mgmt_specs}) + if (${spec_file} IS_NEWER_THAN ${CMAKE_CURRENT_BINARY_DIR}/managementgen.cmake) + message(STATUS "${spec_file} is newer") + set(regen_mgmt ON) + endif (${spec_file} IS_NEWER_THAN ${CMAKE_CURRENT_BINARY_DIR}/managementgen.cmake) +endforeach (spec_file ${mgmt_specs}) +if (regen_mgmt) + message(STATUS "Regenerating Qpid Management Framework sources") + execute_process(COMMAND ${PYTHON_EXECUTABLE} ${mgen_dir}/qmf-gen -c managementgen.cmake -b -l -q -o ${CMAKE_CURRENT_BINARY_DIR}/qmf ${mgmt_specs} + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) +else (regen_mgmt) + message(STATUS "No need to generate Qpid Management Framework sources") +endif (regen_mgmt) + +# Pull in the names of the generated files, i.e. ${rgen_framing_srcs} +include (${CMAKE_CURRENT_BINARY_DIR}/rubygen.cmake) +include (${CMAKE_CURRENT_BINARY_DIR}/managementgen.cmake) # FindDoxygen module tries to locate doxygen and Graphviz dot if (DOXYGEN_FOUND) diff --git a/qpid/cpp/src/qpid/broker/management-schema.xml b/qpid/cpp/src/qpid/broker/management-schema.xml new file mode 100644 index 0000000000..4d66b72318 --- /dev/null +++ b/qpid/cpp/src/qpid/broker/management-schema.xml @@ -0,0 +1,597 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This class represents an inter-broker connection. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- cgit v1.2.1