diff options
| author | Fraser Adams <fadams@apache.org> | 2013-10-25 14:03:36 +0000 |
|---|---|---|
| committer | Fraser Adams <fadams@apache.org> | 2013-10-25 14:03:36 +0000 |
| commit | 0fc6f70f8e8c5cc1dd8bff6b519aca58373ea3ba (patch) | |
| tree | 6f788d7bd0c25b3be5d6467bc0bcbe70791ea00c /qpid/cpp/src | |
| parent | cec6013387ad0c9020b14c74b0040c438bd7cf2a (diff) | |
| download | qpid-python-0fc6f70f8e8c5cc1dd8bff6b519aca58373ea3ba.tar.gz | |
JIRA: QPID-5259 cmake legacy store and linear store messages aren't very helpful if dependencies are missing.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1535739 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src')
| -rw-r--r-- | qpid/cpp/src/legacystore.cmake | 57 | ||||
| -rw-r--r-- | qpid/cpp/src/linearstore.cmake | 57 |
2 files changed, 74 insertions, 40 deletions
diff --git a/qpid/cpp/src/legacystore.cmake b/qpid/cpp/src/legacystore.cmake index 878dc5f247..466d30890d 100644 --- a/qpid/cpp/src/legacystore.cmake +++ b/qpid/cpp/src/legacystore.cmake @@ -26,40 +26,57 @@ else (DEFINED legacystore_force) set (legacystore_default OFF) if (UNIX) # - # Find required BerkelyDB + # Find required BerkeleyDB # 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 legacystore to be built - # - set (legacystore_default ON) - ENDIF (HAVE_UUID AND HAVE_UUID_H) - endif (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) + # + # 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 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) + else (HAVE_AIO AND HAVE_AIO_H) + if (NOT HAVE_AIO) + message(STATUS "Legacystore requires libaio which is absent.") + endif (NOT HAVE_AIO) + if (NOT HAVE_AIO_H) + message(STATUS "Legacystore requires libaio.h which is absent.") + endif (NOT HAVE_AIO_H) + endif (HAVE_AIO AND HAVE_AIO_H) + else (DB_FOUND) + message(STATUS "Legacystore requires BerkeleyDB for C++ which is absent.") 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(FATAL_ERROR "Legacystore requires BerkeleyDB which is absent.") + message(FATAL_ERROR "Legacystore requires BerkeleyDB for C++ which is absent.") endif (NOT DB_FOUND) if (NOT HAVE_AIO) message(FATAL_ERROR "Legacystore requires libaio which is absent.") diff --git a/qpid/cpp/src/linearstore.cmake b/qpid/cpp/src/linearstore.cmake index 6365905c57..d481ae8418 100644 --- a/qpid/cpp/src/linearstore.cmake +++ b/qpid/cpp/src/linearstore.cmake @@ -17,7 +17,7 @@ # under the License. # # -# Legacy store library CMake fragment, to be included in CMakeLists.txt +# Linear store library CMake fragment, to be included in CMakeLists.txt # if (DEFINED linearstore_force) @@ -26,28 +26,45 @@ else (DEFINED linearstore_force) set (linearstore_default OFF) if (UNIX) # - # Find required BerkelyDB + # Find required BerkeleyDB # 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 - # - set (linearstore_default ON) - ENDIF (HAVE_UUID AND HAVE_UUID_H) - endif (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) + # + # 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) + 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) + else (DB_FOUND) + message(STATUS "Linearstore requires BerkeleyDB for C++ which is absent.") endif (DB_FOUND) endif (UNIX) endif (DEFINED linearstore_force) @@ -59,7 +76,7 @@ if (BUILD_LINEARSTORE) message(FATAL_ERROR "Linearstore produced only on Unix platforms") endif (NOT UNIX) if (NOT DB_FOUND) - message(FATAL_ERROR "Linearstore requires BerkeleyDB which is absent.") + message(FATAL_ERROR "Linearstore requires BerkeleyDB for C++ which is absent.") endif (NOT DB_FOUND) if (NOT HAVE_AIO) message(FATAL_ERROR "Linearstore requires libaio which is absent.") |
