diff options
| author | Andrew Stitcher <astitcher@apache.org> | 2009-04-30 17:16:06 +0000 |
|---|---|---|
| committer | Andrew Stitcher <astitcher@apache.org> | 2009-04-30 17:16:06 +0000 |
| commit | 5af5eef7eeff6cb26e34b1755471b4ee621d5edd (patch) | |
| tree | e4fd03b8f11f7ce932dea958516fd1eb5198d339 /cpp/src/rdma.cmake | |
| parent | cd5a790dcf32b692cedb82ef5d08549ce9a2d1b6 (diff) | |
| download | qpid-python-5af5eef7eeff6cb26e34b1755471b4ee621d5edd.tar.gz | |
Made cmake config more like the autotools version
- By default if it detects a dependency it will
build the module that needs it, otherwise it won't
- It can be forced to build modules so that automated
builds that have required outputs can fail config
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@770330 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/rdma.cmake')
| -rw-r--r-- | cpp/src/rdma.cmake | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/cpp/src/rdma.cmake b/cpp/src/rdma.cmake index 30fbe9d279..ab8ed6303c 100644 --- a/cpp/src/rdma.cmake +++ b/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) |
