summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorBenoît Ganne <bganne@cisco.com>2019-10-22 16:55:19 +0200
committerAndrew Yourtchenko <ayourtch@gmail.com>2019-10-31 22:52:40 +0000
commitc07b9b68915aea1fbc35862db878a39c791a6435 (patch)
tree9e580c2af2fdb04b0b8c876fa0c9455b300f6d78 /src/plugins
parent65ef66543afedc233b2e60cc438d7602eec43bfb (diff)
rdma: build: fix ibverb compilation test
Type: fix Change-Id: Ib6389ecbcf4a1b7bae25b2bd9e7fbdec49545aaa Signed-off-by: Benoît Ganne <bganne@cisco.com> (cherry picked from commit 386ebb6e2baa7d3b2535d646c04ccf852f859869)
Diffstat (limited to 'src/plugins')
-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 432330dc55d..bf111195ecc 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")