summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenoît Ganne <bganne@cisco.com>2019-10-22 16:55:19 +0200
committerDamjan Marion <dmarion@me.com>2019-10-23 07:43:25 +0000
commit386ebb6e2baa7d3b2535d646c04ccf852f859869 (patch)
tree17a5252da7a6dd890f8ff2daf0d5ddf4103d77bf
parent70d5d4fa09520bd5825b49960ae896beca3535e8 (diff)
rdma: build: fix ibverb compilation test
Type: fix Change-Id: Ib6389ecbcf4a1b7bae25b2bd9e7fbdec49545aaa Signed-off-by: Benoît Ganne <bganne@cisco.com>
-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")