Skip to content

Commit 2d90bb6

Browse files
committed
cmake sucks
1 parent a9232ec commit 2d90bb6

File tree

3 files changed

+17
-5
lines changed

3 files changed

+17
-5
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
.DS_Store
22
.idea/
33
cmake-build-debug/
4+
build/
45
debug/
56
dxydocs/

CMakeLists.txt

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -913,10 +913,6 @@ if (WITH_RDMA)
913913
add_definitions(-DZMQ_HAVE_RDMA)
914914
list(APPEND cxx-sources rdma_address.hpp rdma_connecter.hpp rdma_engine.hpp rdma_listener.hpp
915915
rdma_address.cpp rdma_connecter.cpp rdma_engine.cpp rdma_listener.cpp)
916-
if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
917-
target_link_libraries(libzmq ibverbs)
918-
target_link_libraries(libzmq-static ibverbs)
919-
endif()
920916
endif ()
921917

922918
#-----------------------------------------------------------------------------
@@ -1171,7 +1167,13 @@ if (BUILD_SHARED)
11711167
if (RT_LIBRARY)
11721168
target_link_libraries(libzmq -lrt)
11731169
endif ()
1174-
endif ()
1170+
1171+
if (WITH_RDMA)
1172+
if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
1173+
target_link_libraries(libzmq ibverbs)
1174+
endif()
1175+
endif ()
1176+
endif()
11751177

11761178
if (BUILD_STATIC)
11771179

@@ -1202,6 +1204,12 @@ if (BUILD_STATIC)
12021204
if (RT_LIBRARY)
12031205
target_link_libraries(libzmq-static -lrt)
12041206
endif ()
1207+
1208+
if (WITH_RDMA)
1209+
if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
1210+
target_link_libraries(libzmq-static ibverbs)
1211+
endif()
1212+
endif ()
12051213
endif ()
12061214

12071215
if (BUILD_SHARED)

src/address.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@
3636
#include "udp_address.hpp"
3737
#include "ipc_address.hpp"
3838
#include "tipc_address.hpp"
39+
#ifdef ZMQ_HAVE_RDMA
40+
#include "rdma_address.hpp"
41+
#endif
3942

4043
#if defined ZMQ_HAVE_VMCI
4144
#include "vmci_address.hpp"

0 commit comments

Comments
 (0)