@@ -669,52 +669,87 @@ include("cmake/GenerateVineyardJava.cmake")
669
669
if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux" )
670
670
find_library (RDMACM_LIB rdmacm )
671
671
find_library (IBVERBS_LIB ibverbs )
672
- find_library (NL3_LIB nl-3 )
673
- find_library (NL_GENL3_LIB nl-genl-3 )
674
- find_library (UUID_LIB uuid )
675
- find_library (NUMA_LIB numa )
676
672
find_library (RT_LIB rt )
673
+ if (NOT RT_LIB )
674
+ message (FATAL_ERROR "Missing librt, please install it and retry" )
675
+ endif ()
676
+ set (FABRIC_MAKEFILE "${CMAKE_SOURCE_DIR} /thirdparty/libfabric/Makefile" )
677
677
678
- if (IBVERBS_LIB AND RDMACM_LIB AND NL3_LIB AND NL_GENL3_LIB AND UUID_LIB AND NUMA_LIB AND RT_LIB )
679
- set (RDMA_LIBS ${RDMACM_LIB} ${IBVERBS_LIB} ${NL3_LIB} ${NL_GENL3_LIB} ${UUID_LIB} ${NUMA_LIB} ${ RT_LIB} )
680
- set ( FABRIC_MAKEFILE " ${CMAKE_SOURCE_DIR} /thirdparty/libfabric/Makefile" )
678
+ if (IBVERBS_LIB AND RDMACM_LIB )
679
+ set (RDMA_LIBS ${RDMACM_LIB} ${IBVERBS_LIB} ${RT_LIB} )
680
+
681
681
add_custom_command (
682
682
OUTPUT ${FABRIC_MAKEFILE}
683
683
COMMAND ./autogen.sh > /dev/null
684
- COMMAND ./configure --disable-efa > /dev/null
684
+ COMMAND ./configure --disable-usnic
685
+ --disable-psm3
686
+ --disable-opx
687
+ --disable-dmabuf_peer_mem
688
+ --disable-hook_hmem
689
+ --disable-hook_debug
690
+ --disable-trace
691
+ --disable-rxm
692
+ --disable-psm2
693
+ --disable-xpmem
694
+ --disable-shm
695
+ --disable-rxd
696
+ --disable-perf
697
+ --disable-efa
698
+ --disable-mrail
699
+ --enable-verbs > /dev/null
685
700
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} /thirdparty/libfabric
686
701
)
687
- add_custom_target (
688
- fabric_configure
689
- DEPENDS ${FABRIC_MAKEFILE}
690
- )
691
- add_custom_target (
692
- fabric ALL
693
- COMMAND make CFLAGS+= "-fPIC" -j$ (nproc ) > /dev/null
694
- COMMAND ${CMAKE_COMMAND} -E copy_if_different
695
- ${CMAKE_SOURCE_DIR} /thirdparty/libfabric/src/.libs/libfabric.a ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY} /libfabric.a
696
- DEPENDS fabric_configure
702
+ else ()
703
+ set (RDMA_LIBS ${RT_LIB} )
704
+ add_custom_command (
705
+ OUTPUT ${FABRIC_MAKEFILE}
706
+ COMMAND ./autogen.sh > /dev/null
707
+ COMMAND ./configure --disable-usnic
708
+ --disable-psm3
709
+ --disable-opx
710
+ --disable-dmabuf_peer_mem
711
+ --disable-hook_hmem
712
+ --disable-hook_debug
713
+ --disable-trace
714
+ --disable-rxm
715
+ --disable-psm2
716
+ --disable-xpmem
717
+ --disable-shm
718
+ --disable-rxd
719
+ --disable-perf
720
+ --disable-efa
721
+ --disable-mrail
722
+ --disable-verbs > /dev/null
697
723
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} /thirdparty/libfabric
698
724
)
725
+ endif ()
726
+ add_custom_target (
727
+ fabric_configure
728
+ DEPENDS ${FABRIC_MAKEFILE}
729
+ )
730
+ add_custom_target (
731
+ fabric ALL
732
+ COMMAND make CFLAGS+= "-fPIC" -j$ (nproc ) > /dev/null
733
+ COMMAND ${CMAKE_COMMAND} -E copy_if_different
734
+ ${CMAKE_SOURCE_DIR} /thirdparty/libfabric/src/.libs/libfabric.a ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY} /libfabric.a
735
+ DEPENDS fabric_configure
736
+ WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} /thirdparty/libfabric
737
+ )
699
738
700
- set (LIBFABRIC "${CMAKE_ARCHIVE_OUTPUT_DIRECTORY} /libfabric.a" )
701
- set (LIBFABRIC_VERSION_SCRIPT "${CMAKE_SOURCE_DIR} /src/common/rdma/libfabric.map" )
702
- install (DIRECTORY "${PROJECT_SOURCE_DIR} /thirdparty/libfabric/include"
703
- DESTINATION ${CMAKE_INSTALL_PREFIX} /include/vineyard/contrib/libfabric
704
- PATTERN "*.h"
705
- )
706
- include_directories (BEFORE SYSTEM
707
- $< BUILD_INTERFACE:${PROJECT_SOURCE_DIR} /thirdparty/libfabric/include>
708
- $< INSTALL_INTERFACE:include/vineyard/contrib>
709
- )
710
- list (APPEND VINEYARD_INSTALL_LIBS ${LIBFABRIC} )
739
+ set (LIBFABRIC "${CMAKE_ARCHIVE_OUTPUT_DIRECTORY} /libfabric.a" )
740
+ set (LIBFABRIC_VERSION_SCRIPT "${CMAKE_SOURCE_DIR} /src/common/rdma/libfabric.map" )
741
+ install (DIRECTORY "${PROJECT_SOURCE_DIR} /thirdparty/libfabric/include"
742
+ DESTINATION ${CMAKE_INSTALL_PREFIX} /include/vineyard/contrib/libfabric
743
+ PATTERN "*.h"
744
+ )
745
+ include_directories (BEFORE SYSTEM
746
+ $< BUILD_INTERFACE:${PROJECT_SOURCE_DIR} /thirdparty/libfabric/include>
747
+ $< INSTALL_INTERFACE:include/vineyard/contrib>
748
+ )
749
+ list (APPEND VINEYARD_INSTALL_LIBS ${LIBFABRIC} )
711
750
712
- set_property (DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES
713
- ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY} /libfabric.a )
714
- else ()
715
- message ("${RDMACM_LIB} ${IBVERBS_LIB} ${NL3_LIB} ${NL_GENL3_LIB} ${UUID_LIB} ${NUMA_LIB} ${RT_LIB} " )
716
- message (FATAL_ERROR "Missing rdma dependencies, please install them and retry: rdmacm, ibverbs, libnl-3, libnl-genl-3, libuuid, libnuma, librt" )
717
- endif ()
751
+ set_property (DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES
752
+ ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY} /libfabric.a )
718
753
endif ()
719
754
720
755
# boost is only required by some components
0 commit comments