summaryrefslogtreecommitdiffstats
path: root/src/plugins/rdma/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/rdma/CMakeLists.txt')
-rw-r--r--src/plugins/rdma/CMakeLists.txt8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/plugins/rdma/CMakeLists.txt b/src/plugins/rdma/CMakeLists.txt
index eaf747db54f..86fc68f550a 100644
--- a/src/plugins/rdma/CMakeLists.txt
+++ b/src/plugins/rdma/CMakeLists.txt
@@ -27,12 +27,10 @@ if (NOT IBVERBS_LIB OR NOT RDMA_UTIL_LIB OR NOT MLX5_LIB)
return()
endif()
-if (MLX5_LIB)
- string_append(RDMA_LINK_FLAGS "-Wl,--whole-archive,${MLX5_LIB},--no-whole-archive")
-endif()
+string_append(RDMA_LINK_FLAGS "-Wl,--whole-archive,${MLX5_LIB},--no-whole-archive")
-set(CMAKE_REQUIRED_FLAGS "-fPIC -shared ${IBVERBS_LIB} ${RDMA_UTIL_LIB} ${RDMA_LINK_FLAGS}")
-CHECK_C_SOURCE_COMPILES("" IBVERBS_COMPILES_CHECK)
+set(CMAKE_REQUIRED_FLAGS "-fPIC -shared -pthread ${RDMA_LINK_FLAGS} ${IBVERBS_LIB} ${RDMA_UTIL_LIB}")
+CHECK_C_SOURCE_COMPILES("int main(void) { return 0; }" IBVERBS_COMPILES_CHECK)
if (NOT IBVERBS_COMPILES_CHECK)
message(WARNING "rdma plugins - no working ibverbs found - rdma plugin disabled")