From 386ebb6e2baa7d3b2535d646c04ccf852f859869 Mon Sep 17 00:00:00 2001 From: Benoît Ganne Date: Tue, 22 Oct 2019 16:55:19 +0200 Subject: rdma: build: fix ibverb compilation test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Type: fix Change-Id: Ib6389ecbcf4a1b7bae25b2bd9e7fbdec49545aaa Signed-off-by: Benoît Ganne --- src/plugins/rdma/CMakeLists.txt | 8 +++----- 1 file 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") -- cgit 1.2.3-korg