diff options
| author | Charles E. Rolke <chug@apache.org> | 2013-01-14 20:58:43 +0000 |
|---|---|---|
| committer | Charles E. Rolke <chug@apache.org> | 2013-01-14 20:58:43 +0000 |
| commit | fdfdf42f9f5105b97735f25f181b01a955eec9c8 (patch) | |
| tree | 6060ba3647cb282cdb5defa41bdb0131c238d367 /cpp | |
| parent | 84666f8de58384f0c569c6d873271319c31c24d2 (diff) | |
| download | qpid-python-fdfdf42f9f5105b97735f25f181b01a955eec9c8.tar.gz | |
QPID-4535 Cmake build broken by legacy store
Check for libaio and uuid.
Fix logic error that allowed build to proceed when DB_FOUND was false.
Remove unnecessary 'rt' from link.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1433127 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp')
| -rw-r--r-- | cpp/src/legacystore.cmake | 34 |
1 files changed, 31 insertions, 3 deletions
diff --git a/cpp/src/legacystore.cmake b/cpp/src/legacystore.cmake index 7a636dc64e..10a166f50c 100644 --- a/cpp/src/legacystore.cmake +++ b/cpp/src/legacystore.cmake @@ -30,7 +30,24 @@ else (DEFINED legacystore_force) # include (finddb.cmake) if (DB_FOUND) - set (legacystore_default ON) + # + # 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) endif (DB_FOUND) endif (UNIX) endif (DEFINED legacystore_force) @@ -42,8 +59,20 @@ if (BUILD_LEGACYSTORE) message(FATAL_ERROR "Legacystore produced only on Unix platforms") endif (NOT UNIX) if (NOT DB_FOUND) - message(STATUS "Legacystore requires BerkeleyDB which is absent.") + message(FATAL_ERROR "Legacystore requires BerkeleyDB which is absent.") endif (NOT DB_FOUND) + if (NOT HAVE_AIO) + message(FATAL_ERROR "Legacystore requires libaio which is absent.") + endif (NOT HAVE_AIO) + 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 @@ -119,7 +148,6 @@ if (BUILD_LEGACYSTORE) target_link_libraries (legacystore aio - rt uuid qpidcommon qpidtypes qpidbroker ${DB_LIBRARY} |
