summaryrefslogtreecommitdiffstats
path: root/cmake/modules/Findrdmacm.cmake
diff options
context:
space:
mode:
authorhaodong <haodong.tang@intel.com>2018-06-08 14:59:19 +0200
committerhaodong <haodong.tang@intel.com>2018-06-20 08:08:26 +0200
commitf54e42f3a3d93d7eb4ca11e274a3e50f19326753 (patch)
treeff535dfea313e7de44121758696aa6a1f5ea091b /cmake/modules/Findrdmacm.cmake
parentmsg/async/rdma: support qp that isn't associated with SRQ (diff)
downloadceph-f54e42f3a3d93d7eb4ca11e274a3e50f19326753.tar.xz
ceph-f54e42f3a3d93d7eb4ca11e274a3e50f19326753.zip
msg/async/rdma: cmake find_package for librdmacm
Signed-off-by: Haodong Tang <haodong.tang@intel.com>
Diffstat (limited to 'cmake/modules/Findrdmacm.cmake')
-rw-r--r--cmake/modules/Findrdmacm.cmake18
1 files changed, 18 insertions, 0 deletions
diff --git a/cmake/modules/Findrdmacm.cmake b/cmake/modules/Findrdmacm.cmake
new file mode 100644
index 00000000000..310b8130e61
--- /dev/null
+++ b/cmake/modules/Findrdmacm.cmake
@@ -0,0 +1,18 @@
+# - Find rdma cm
+# Find the rdma cm library and includes
+#
+# RDMACM_INCLUDE_DIR - where to find cma.h, etc.
+# RDMACM_LIBRARIES - List of libraries when using rdmacm.
+# RDMACM_FOUND - True if rdmacm found.
+
+find_path(RDMACM_INCLUDE_DIR rdma/rdma_cma.h)
+find_library(RDMACM_LIBRARIES rdmacm)
+
+# handle the QUIETLY and REQUIRED arguments and set UUID_FOUND to TRUE if
+# all listed variables are TRUE
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(rdmacm DEFAULT_MSG RDMACM_LIBRARIES RDMACM_INCLUDE_DIR)
+
+mark_as_advanced(
+ RDMACM_LIBRARIES
+)