diff options
Diffstat (limited to 'qpid/cpp/src/rdma.cmake')
| -rw-r--r-- | qpid/cpp/src/rdma.cmake | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/qpid/cpp/src/rdma.cmake b/qpid/cpp/src/rdma.cmake index 30fbe9d279..ab8ed6303c 100644 --- a/qpid/cpp/src/rdma.cmake +++ b/qpid/cpp/src/rdma.cmake @@ -25,12 +25,20 @@ include(CheckIncludeFiles) include(CheckLibraryExists) -option(BUILD_RDMA "Build with support for Remote DMA protocols" OFF) +CHECK_LIBRARY_EXISTS (ibverbs ibv_create_qp "" HAVE_IBVERBS) +CHECK_LIBRARY_EXISTS (rdmacm rdma_create_id "" HAVE_RDMACM) +CHECK_INCLUDE_FILES (infiniband/verbs.h HAVE_IBVERBS_H) +CHECK_INCLUDE_FILES (rdma/rdma_cma.h HAVE_RDMACM_H) + +set (rdma_default ${rdma_force}) +if (HAVE_IBVERBS AND HAVE_IBVERBS_H) + if (HAVE_RDMACM AND HAVE_RDMACM_H) + set (rdma_default ON) + endif (HAVE_RDMACM AND HAVE_RDMACM_H) +endif (HAVE_IBVERBS AND HAVE_IBVERBS_H) + +option(BUILD_RDMA "Build with support for Remote DMA protocols" ${rdma_default}) if (BUILD_RDMA) - CHECK_LIBRARY_EXISTS (ibverbs ibv_create_qp "" HAVE_IBVERBS) - CHECK_LIBRARY_EXISTS (rdmacm rdma_create_id "" HAVE_RDMACM) - CHECK_INCLUDE_FILES (infiniband/verbs.h HAVE_IBVERBS_H) - CHECK_INCLUDE_FILES (rdma/rdma_cma.h HAVE_RDMACM_H) if (NOT HAVE_IBVERBS) message(FATAL_ERROR "libibverbs not found, required for RDMA support") endif (NOT HAVE_IBVERBS) |
