From 483eb2f56657e8e7f419ab1a4fab8dce9ade8609 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 27 Apr 2024 20:24:20 +0200 Subject: Adding upstream version 14.2.21. Signed-off-by: Daniel Baumann --- cmake/modules/Findrdmacm.cmake | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 cmake/modules/Findrdmacm.cmake (limited to 'cmake/modules/Findrdmacm.cmake') diff --git a/cmake/modules/Findrdmacm.cmake b/cmake/modules/Findrdmacm.cmake new file mode 100644 index 00000000..0016180f --- /dev/null +++ b/cmake/modules/Findrdmacm.cmake @@ -0,0 +1,26 @@ +# - 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) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(rdmacm DEFAULT_MSG RDMACM_LIBRARIES RDMACM_INCLUDE_DIR) + +if(RDMACM_FOUND) + if(NOT TARGET RDMA::RDMAcm) + add_library(RDMA::RDMAcm UNKNOWN IMPORTED) + endif() + set_target_properties(RDMA::RDMAcm PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${RDMACM_INCLUDE_DIR}" + IMPORTED_LINK_INTERFACE_LANGUAGES "C" + IMPORTED_LOCATION "${RDMACM_LIBRARIES}") +endif() + +mark_as_advanced( + RDMACM_LIBRARIES +) -- cgit v1.2.3