qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@apache.org
Subject svn commit: r1431635 - in /qpid/trunk/qpid/cpp/src: CMakeLists.txt Makefile.am finddb.cmake legacystore.cmake tests/CMakeLists.txt tests/legacystore/CMakeLists.txt
Date Thu, 10 Jan 2013 20:57:50 GMT
Author: chug
Date: Thu Jan 10 20:57:50 2013
New Revision: 1431635

URL: http://svn.apache.org/viewvc?rev=1431635&view=rev
Log:
QPID-1726 ASF licensed QPID store - reenable in build
Add new legacystore.cmake to EXTRA_DIST in makefile suite.
Fix cmake scripts for core library and tests.
Note: Tests are not truly integrated. Four standalone unit tests are starters for proving
functionality.

Modified:
    qpid/trunk/qpid/cpp/src/CMakeLists.txt
    qpid/trunk/qpid/cpp/src/Makefile.am
    qpid/trunk/qpid/cpp/src/finddb.cmake
    qpid/trunk/qpid/cpp/src/legacystore.cmake
    qpid/trunk/qpid/cpp/src/tests/CMakeLists.txt
    qpid/trunk/qpid/cpp/src/tests/legacystore/CMakeLists.txt

Modified: qpid/trunk/qpid/cpp/src/CMakeLists.txt
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/CMakeLists.txt?rev=1431635&r1=1431634&r2=1431635&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/CMakeLists.txt (original)
+++ qpid/trunk/qpid/cpp/src/CMakeLists.txt Thu Jan 10 20:57:50 2013
@@ -208,7 +208,7 @@ execute_process(COMMAND ${RUBY_EXECUTABL
   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/legacystore/management-schema.xml
   )
   set(mgen_dir ${qpid-cpp_SOURCE_DIR}/managementgen)
   set(regen_mgmt OFF)
@@ -1479,7 +1479,7 @@ install_pdb (qmfconsole ${QPID_COMPONENT
 #
 # Legacy store
 #
-#include (legacystore.cmake)
+include (legacystore.cmake)
 
 # This is only really needed until all the trunk builds (Linux, UNIX, Windows)
 # are all on cmake only. This is because cmake builds always have a config.h

Modified: qpid/trunk/qpid/cpp/src/Makefile.am
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/Makefile.am?rev=1431635&r1=1431634&r2=1431635&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/Makefile.am (original)
+++ qpid/trunk/qpid/cpp/src/Makefile.am Thu Jan 10 20:57:50 2013
@@ -298,6 +298,7 @@ EXTRA_DIST +=\
   amqp.cmake \
   rdma.cmake \
   ssl.cmake \
+  legacystore.cmake \
   managementgen.cmake \
   rubygen.cmake \
   versions.cmake \

Modified: qpid/trunk/qpid/cpp/src/finddb.cmake
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/finddb.cmake?rev=1431635&r1=1431634&r2=1431635&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/finddb.cmake (original)
+++ qpid/trunk/qpid/cpp/src/finddb.cmake Thu Jan 10 20:57:50 2013
@@ -18,6 +18,7 @@
 #
 #
 
+if(UNIX)
 # - Find BerkeleyDB
 # Find the BerkeleyDB includes and library
 # This module defines
@@ -44,7 +45,7 @@ IF (DB_LIBRARY AND DB_INCLUDE_DIR)
     SET(DB_LIBRARIES ${DB_LIBRARY})
     SET(DB_FOUND "YES")
 ELSE (DB_LIBRARY AND DB_INCLUDE_DIR)
-    SET(DB_FOUND "NO")
+    UNSET( DB_FOUND )
 ENDIF (DB_LIBRARY AND DB_INCLUDE_DIR)
 
 
@@ -66,3 +67,8 @@ MARK_AS_ADVANCED(
     DB_LIBRARY
     DB_INCLUDE_DIR
 )
+
+else(UNIX)
+    MESSAGE(STATUS "BerkeleyDB is ignored on non-Unix platforms")
+    UNSET( DB_FOUND )
+endif(UNIX)
\ No newline at end of file

Modified: qpid/trunk/qpid/cpp/src/legacystore.cmake
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/legacystore.cmake?rev=1431635&r1=1431634&r2=1431635&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/legacystore.cmake (original)
+++ qpid/trunk/qpid/cpp/src/legacystore.cmake Thu Jan 10 20:57:50 2013
@@ -20,105 +20,110 @@
 # Legacy store library CMake fragment, to be included in CMakeLists.txt
 # 
 
-#
-# Find required BerkelyDB
-#
-include (finddb.cmake)
-
-#
-# Conditionally build legacystore
-#
-set (legacystore_default ${legacystore_force})
-if (UNIX AND DB_FOUND)
-  set (legacystore_default ON)
-endif (UNIX AND DB_FOUND)
+if (DEFINED legacystore_force)
+    set (legacystore_default ${legacystore_force})
+else (DEFINED legacystore_force)
+    set (legacystore_default OFF)
+    if (UNIX)
+        #
+        # Find required BerkelyDB
+        #
+        include (finddb.cmake)
+        if (DB_FOUND)
+            set (legacystore_default ON)
+        endif (DB_FOUND)
+    endif (UNIX)
+endif (DEFINED legacystore_force)
+
 option(BUILD_LEGACYSTORE "Build legacystore persistent store" ${legacystore_default})
 
 if (BUILD_LEGACYSTORE)
-  if (NOT UNIX)
-    message(FATAL_ERROR "Legacystore produced only on Unix platforms")
-  endif (NOT UNIX)
-  if (NOT DB_FOUND)
-    message(STATUS "Legacystore requires BerkeleyDB which is absent.")
-  endif (NOT DB_FOUND)
+    if (NOT UNIX)
+        message(FATAL_ERROR "Legacystore produced only on Unix platforms")
+    endif (NOT UNIX)
+    if (NOT DB_FOUND)
+        message(STATUS "Legacystore requires BerkeleyDB which is absent.")
+    endif (NOT DB_FOUND)
+
+    # Journal source files
+    set (legacy_jrnl_SOURCES
+        qpid/legacystore/jrnl/aio.cpp
+        qpid/legacystore/jrnl/cvar.cpp
+        qpid/legacystore/jrnl/data_tok.cpp
+        qpid/legacystore/jrnl/deq_rec.cpp
+        qpid/legacystore/jrnl/enq_map.cpp
+        qpid/legacystore/jrnl/enq_rec.cpp
+        qpid/legacystore/jrnl/fcntl.cpp
+        qpid/legacystore/jrnl/jcntl.cpp
+        qpid/legacystore/jrnl/jdir.cpp
+        qpid/legacystore/jrnl/jerrno.cpp
+        qpid/legacystore/jrnl/jexception.cpp
+        qpid/legacystore/jrnl/jinf.cpp
+        qpid/legacystore/jrnl/jrec.cpp
+        qpid/legacystore/jrnl/lp_map.cpp
+        qpid/legacystore/jrnl/lpmgr.cpp
+        qpid/legacystore/jrnl/pmgr.cpp
+        qpid/legacystore/jrnl/rmgr.cpp
+        qpid/legacystore/jrnl/rfc.cpp
+        qpid/legacystore/jrnl/rrfc.cpp
+        qpid/legacystore/jrnl/slock.cpp
+        qpid/legacystore/jrnl/smutex.cpp
+        qpid/legacystore/jrnl/time_ns.cpp
+        qpid/legacystore/jrnl/txn_map.cpp
+        qpid/legacystore/jrnl/txn_rec.cpp
+        qpid/legacystore/jrnl/wmgr.cpp
+        qpid/legacystore/jrnl/wrfc.cpp
+    )
+
+    # legacyStore source files
+    set (legacy_store_SOURCES
+        qpid/legacystore/StorePlugin.cpp
+        qpid/legacystore/BindingDbt.cpp
+        qpid/legacystore/BufferValue.cpp
+        qpid/legacystore/DataTokenImpl.cpp
+        qpid/legacystore/IdDbt.cpp
+        qpid/legacystore/IdSequence.cpp
+        qpid/legacystore/JournalImpl.cpp
+        qpid/legacystore/MessageStoreImpl.cpp
+        qpid/legacystore/PreparedTransaction.cpp
+        qpid/legacystore/TxnCtxt.cpp
+    )
+
+    # legacyStore include directories
+    get_property(dirs DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY INCLUDE_DIRECTORIES)
+    set (legacy_include_DIRECTORIES
+        ${dirs}
+        ${CMAKE_CURRENT_SOURCE_DIR}/qpid/legacystore
+    )
+
+    if(NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/db-inc.h)
+      message(STATUS "Including BDB from ${DB_INCLUDE_DIR}/db_cxx.h")
+        file(WRITE 
+             ${CMAKE_CURRENT_BINARY_DIR}/db-inc.h
+             "#include <${DB_INCLUDE_DIR}/db_cxx.h>")
+    endif()
+
+    add_library (legacystore SHARED
+        ${legacy_jrnl_SOURCES}
+        ${legacy_store_SOURCES}
+        ${legacy_qmf_SOURCES}
+    )
+        
+    set_target_properties (legacystore PROPERTIES
+        PREFIX ""
+        COMPILE_DEFINITIONS _IN_QPID_BROKER
+        OUTPUT_NAME legacystore
+        SOVERSION ${legacystore_version}
+        INCLUDE_DIRECTORIES "${legacy_include_DIRECTORIES}"
+    )
+
+    target_link_libraries (legacystore
+        aio
+        rt
+        uuid
+        qpidcommon qpidtypes qpidbroker
+        ${DB_LIBRARY}
+    )
+else (BUILD_LEGACYSTORE)
+    message(STATUS "Legacystore is excluded from build.")
 endif (BUILD_LEGACYSTORE)
-
-# Journal source files
-set (legacy_jrnl_SOURCES
-    qpid/legacystore/jrnl/aio.cpp
-    qpid/legacystore/jrnl/cvar.cpp
-    qpid/legacystore/jrnl/data_tok.cpp
-    qpid/legacystore/jrnl/deq_rec.cpp
-    qpid/legacystore/jrnl/enq_map.cpp
-    qpid/legacystore/jrnl/enq_rec.cpp
-    qpid/legacystore/jrnl/fcntl.cpp
-    qpid/legacystore/jrnl/jcntl.cpp
-    qpid/legacystore/jrnl/jdir.cpp
-    qpid/legacystore/jrnl/jerrno.cpp
-    qpid/legacystore/jrnl/jexception.cpp
-    qpid/legacystore/jrnl/jinf.cpp
-    qpid/legacystore/jrnl/jrec.cpp
-    qpid/legacystore/jrnl/lp_map.cpp
-    qpid/legacystore/jrnl/lpmgr.cpp
-    qpid/legacystore/jrnl/pmgr.cpp
-    qpid/legacystore/jrnl/rmgr.cpp
-    qpid/legacystore/jrnl/rfc.cpp
-    qpid/legacystore/jrnl/rrfc.cpp
-    qpid/legacystore/jrnl/slock.cpp
-    qpid/legacystore/jrnl/smutex.cpp
-    qpid/legacystore/jrnl/time_ns.cpp
-    qpid/legacystore/jrnl/txn_map.cpp
-    qpid/legacystore/jrnl/txn_rec.cpp
-    qpid/legacystore/jrnl/wmgr.cpp
-    qpid/legacystore/jrnl/wrfc.cpp
-)
-
-# legacyStore source files
-set (legacy_store_SOURCES
-    qpid/legacystore/StorePlugin.cpp
-    qpid/legacystore/BindingDbt.cpp
-    qpid/legacystore/BufferValue.cpp
-    qpid/legacystore/DataTokenImpl.cpp
-    qpid/legacystore/IdDbt.cpp
-    qpid/legacystore/IdSequence.cpp
-    qpid/legacystore/JournalImpl.cpp
-    qpid/legacystore/MessageStoreImpl.cpp
-    qpid/legacystore/PreparedTransaction.cpp
-    qpid/legacystore/TxnCtxt.cpp
-)
-
-# legacyStore include directories
-get_property(dirs DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY INCLUDE_DIRECTORIES)
-set (legacy_include_DIRECTORIES
-    ${dirs}
-    ${CMAKE_CURRENT_SOURCE_DIR}/qpid/legacystore
-)
-
-if(NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/db-inc.h)
-  message(STATUS "Including BDB from ${DB_INCLUDE_DIR}/db_cxx.h")
-    file(WRITE 
-         ${CMAKE_CURRENT_BINARY_DIR}/db-inc.h
-         "#include <${DB_INCLUDE_DIR}/db_cxx.h>")
-endif()
-
-add_library (legacystore SHARED
-    ${legacy_jrnl_SOURCES}
-    ${legacy_store_SOURCES}
-    ${legacy_qmf_SOURCES}
-)
-    
-set_target_properties (legacystore PROPERTIES
-    PREFIX ""
-    COMPILE_DEFINITIONS _IN_QPID_BROKER
-    OUTPUT_NAME legacystore
-    SOVERSION ${legacystore_version}
-    INCLUDE_DIRECTORIES "${legacy_include_DIRECTORIES}"
-)
-
-target_link_libraries (legacystore
-    aio
-    rt
-    uuid
-    qpidcommon qpidtypes qpidbroker
-    ${DB_LIBRARY}
-)

Modified: qpid/trunk/qpid/cpp/src/tests/CMakeLists.txt
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/CMakeLists.txt?rev=1431635&r1=1431634&r2=1431635&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/CMakeLists.txt (original)
+++ qpid/trunk/qpid/cpp/src/tests/CMakeLists.txt Thu Jan 10 20:57:50 2013
@@ -348,4 +348,4 @@ add_library (dlclose_noop MODULE dlclose
 #
 # legacystore
 #
-#add_subdirectory(legacystore)
+add_subdirectory(legacystore)

Modified: qpid/trunk/qpid/cpp/src/tests/legacystore/CMakeLists.txt
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/legacystore/CMakeLists.txt?rev=1431635&r1=1431634&r2=1431635&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/legacystore/CMakeLists.txt (original)
+++ qpid/trunk/qpid/cpp/src/tests/legacystore/CMakeLists.txt Thu Jan 10 20:57:50 2013
@@ -17,6 +17,10 @@
 # under the License.
 #
 
+if(BUILD_LEGACYSTORE)
+
+message(STATUS "Building legacystore tests")
+
 # Enable dashboard reporting.
 include (CTest)
 
@@ -109,3 +113,5 @@ if (PYTHON_EXECUTABLE)
   execute_process(COMMAND ${PYTHON_EXECUTABLE} setup.py install --prefix=${pythoon_bld} --install-lib=${python_bld}
--install-scripts=${python_bld}/commands
                   WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/../python)
 endif (PYTHON_EXECUTABLE)
+
+endif (BUILD_LEGACYSTORE)



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


Mime
View raw message