summaryrefslogtreecommitdiff
path: root/qpid/cpp/src/legacystore.cmake
diff options
context:
space:
mode:
authorCharles E. Rolke <chug@apache.org>2013-01-10 20:57:50 +0000
committerCharles E. Rolke <chug@apache.org>2013-01-10 20:57:50 +0000
commit18c61825e6e23b0b48972028670178b48d1b5f8b (patch)
tree289963806b2e58c26bd42acbda96f0e4e9fb14de /qpid/cpp/src/legacystore.cmake
parentae68a3eb895428cc564868c6c6a8e4e1b9464baa (diff)
downloadqpid-python-18c61825e6e23b0b48972028670178b48d1b5f8b.tar.gz
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. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1431635 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/legacystore.cmake')
-rw-r--r--qpid/cpp/src/legacystore.cmake189
1 files changed, 97 insertions, 92 deletions
diff --git a/qpid/cpp/src/legacystore.cmake b/qpid/cpp/src/legacystore.cmake
index 126d525a26..7a636dc64e 100644
--- a/qpid/cpp/src/legacystore.cmake
+++ b/qpid/cpp/src/legacystore.cmake
@@ -20,105 +20,110 @@
# Legacy store library CMake fragment, to be included in CMakeLists.txt
#
-#
-# Find required BerkelyDB
-#
-include (finddb.cmake)
+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)
-#
-# Conditionally build legacystore
-#
-set (legacystore_default ${legacystore_force})
-if (UNIX AND DB_FOUND)
- set (legacystore_default ON)
-endif (UNIX AND DB_FOUND)
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)
-endif (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)
-# 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
-)
+ # 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 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
-)
+ # 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()
+ 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}"
-)
+ 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}
-)
+ 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)