From 368e40b6f2525eb907d2d4b2f3d25c7a90ed6b7d Mon Sep 17 00:00:00 2001 From: Andrew Stitcher Date: Wed, 15 Jan 2014 22:31:53 +0000 Subject: NO-JIRA: Removed linear/legacy store CMake checks for uuid library - The stores do not directly depend on the library but rather use the platform indirection in qpid to get to uuid capabilities. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1558591 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/cpp/src/legacystore.cmake | 26 ++---------- qpid/cpp/src/linearstore.cmake | 47 ++++++---------------- .../src/qpid/linearstore/journal/EmptyFilePool.cpp | 2 +- 3 files changed, 16 insertions(+), 59 deletions(-) diff --git a/qpid/cpp/src/legacystore.cmake b/qpid/cpp/src/legacystore.cmake index de589189c3..160ca56988 100644 --- a/qpid/cpp/src/legacystore.cmake +++ b/qpid/cpp/src/legacystore.cmake @@ -37,24 +37,10 @@ else (DEFINED legacystore_force) CHECK_INCLUDE_FILES (libaio.h HAVE_AIO_H) if (HAVE_AIO AND HAVE_AIO_H) # - # find libuuid + # allow legacystore to be built # - CHECK_LIBRARY_EXISTS (uuid uuid_compare "" HAVE_UUID) - CHECK_INCLUDE_FILES(uuid/uuid.h HAVE_UUID_H) - if (HAVE_UUID AND HAVE_UUID_H) - # - # allow legacystore to be built - # - message(STATUS "BerkeleyDB for C++, libaio and uuid found, Legacystore support enabled") - set (legacystore_default ON) - else (HAVE_UUID AND HAVE_UUID_H) - if (NOT HAVE_UUID) - message(STATUS "Legacystore requires uuid which is absent.") - endif (NOT HAVE_UUID) - if (NOT HAVE_UUID_H) - message(STATUS "Legacystore requires uuid.h which is absent.") - endif (NOT HAVE_UUID_H) - endif (HAVE_UUID AND HAVE_UUID_H) + message(STATUS "BerkeleyDB for C++ and libaio found, Legacystore support enabled") + set (legacystore_default ON) else (HAVE_AIO AND HAVE_AIO_H) if (NOT HAVE_AIO) message(STATUS "Legacystore requires libaio which is absent.") @@ -84,12 +70,6 @@ if (BUILD_LEGACYSTORE) if (NOT HAVE_AIO_H) message(FATAL_ERROR "Legacystore requires libaio.h which is absent.") endif (NOT HAVE_AIO_H) - if (NOT HAVE_UUID) - message(FATAL_ERROR "Legacystore requires uuid which is absent.") - endif (NOT HAVE_UUID) - if (NOT HAVE_UUID_H) - message(FATAL_ERROR "Legacystore requires uuid.h which is absent.") - endif (NOT HAVE_UUID_H) # Journal source files set (legacy_jrnl_SOURCES diff --git a/qpid/cpp/src/linearstore.cmake b/qpid/cpp/src/linearstore.cmake index d576f78bef..cfab3987db 100644 --- a/qpid/cpp/src/linearstore.cmake +++ b/qpid/cpp/src/linearstore.cmake @@ -30,39 +30,22 @@ else (DEFINED linearstore_force) # include (finddb.cmake) if (DB_FOUND) - # - # find libaio - # - CHECK_LIBRARY_EXISTS (aio io_queue_init "" HAVE_AIO) - CHECK_INCLUDE_FILES (libaio.h HAVE_AIO_H) - if (HAVE_AIO AND HAVE_AIO_H) - # - # find libuuid - # - CHECK_LIBRARY_EXISTS (uuid uuid_compare "" HAVE_UUID) - CHECK_INCLUDE_FILES(uuid/uuid.h HAVE_UUID_H) - if (HAVE_UUID AND HAVE_UUID_H) - # - # allow linearstore to be built - # - message(STATUS "BerkeleyDB for C++, libaio and uuid found, Linearstore support enabled") - set (linearstore_default ON) - else (HAVE_UUID AND HAVE_UUID_H) - if (NOT HAVE_UUID) - message(STATUS "Linearstore requires uuid which is absent.") - endif (NOT HAVE_UUID) - if (NOT HAVE_UUID_H) - message(STATUS "Linearstore requires uuid.h which is absent.") - endif (NOT HAVE_UUID_H) - endif (HAVE_UUID AND HAVE_UUID_H) - else (HAVE_AIO AND HAVE_AIO_H) + # + # find libaio + # + CHECK_LIBRARY_EXISTS (aio io_queue_init "" HAVE_AIO) + CHECK_INCLUDE_FILES (libaio.h HAVE_AIO_H) + if (HAVE_AIO AND HAVE_AIO_H) + message(STATUS "BerkeleyDB for C++ and libaio found, Linearstore support enabled") + set (linearstore_default ON) + else (HAVE_AIO AND HAVE_AIO_H) if (NOT HAVE_AIO) message(STATUS "Linearstore requires libaio which is absent.") endif (NOT HAVE_AIO) if (NOT HAVE_AIO_H) message(STATUS "Linearstore requires libaio.h which is absent.") endif (NOT HAVE_AIO_H) - endif (HAVE_AIO AND HAVE_AIO_H) + endif (HAVE_AIO AND HAVE_AIO_H) else (DB_FOUND) message(STATUS "Linearstore requires BerkeleyDB for C++ which is absent.") endif (DB_FOUND) @@ -84,12 +67,6 @@ if (BUILD_LINEARSTORE) if (NOT HAVE_AIO_H) message(FATAL_ERROR "Linearstore requires libaio.h which is absent.") endif (NOT HAVE_AIO_H) - if (NOT HAVE_UUID) - message(FATAL_ERROR "Linearstore requires uuid which is absent.") - endif (NOT HAVE_UUID) - if (NOT HAVE_UUID_H) - message(FATAL_ERROR "Linearstore requires uuid.h which is absent.") - endif (NOT HAVE_UUID_H) # Journal source files set (linear_jrnl_SOURCES @@ -105,8 +82,8 @@ if (BUILD_LINEARSTORE) qpid/linearstore/journal/jdir.cpp qpid/linearstore/journal/jerrno.cpp qpid/linearstore/journal/jexception.cpp - qpid/linearstore/journal/JournalFile.cpp - qpid/linearstore/journal/JournalLog.cpp + qpid/linearstore/journal/JournalFile.cpp + qpid/linearstore/journal/JournalLog.cpp qpid/linearstore/journal/LinearFileController.cpp qpid/linearstore/journal/pmgr.cpp qpid/linearstore/journal/RecoveryManager.cpp diff --git a/qpid/cpp/src/qpid/linearstore/journal/EmptyFilePool.cpp b/qpid/cpp/src/qpid/linearstore/journal/EmptyFilePool.cpp index 83db81dce8..540bdcaf14 100644 --- a/qpid/cpp/src/qpid/linearstore/journal/EmptyFilePool.cpp +++ b/qpid/cpp/src/qpid/linearstore/journal/EmptyFilePool.cpp @@ -28,9 +28,9 @@ #include "qpid/linearstore/journal/JournalLog.h" #include "qpid/linearstore/journal/slock.h" #include "qpid/linearstore/journal/utils/file_hdr.h" +#include "qpid/sys/uuid.h" #include #include -#include #include //#include // DEBUG -- cgit v1.2.1