From: Casey Bodley Date: Thu, 4 Sep 2014 15:18:55 +0000 (-0400) Subject: cmake: add xio X-Git-Tag: v0.93~265^2~9 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=aba35bcaffe38eb8c345c00c42268cdc67934efc;p=ceph.git cmake: add xio Signed-off-by: Casey Bodley Signed-off-by: Matt Benjamin --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 1de9314da75b..f827fcf2a460 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -223,7 +223,7 @@ else(${ENABLE_SHARED}) endif(${ENABLE_SHARED}) set(Boost_USE_MULTITHREADED ON) -find_package(Boost COMPONENTS thread system REQUIRED) +find_package(Boost COMPONENTS thread system regex REQUIRED) include_directories(${Boost_INCLUDE_DIRS}) find_package(Threads REQUIRED) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 2347c0eccb62..a055d2cedb3f 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -15,7 +15,7 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -rdynamic -Wall -Wtype-limits -Wignored-qual set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -ftemplate-depth-1024 -Wno-invalid-offsetof -Wnon-virtual-dtor -Wno-invalid-offsetof -Wstrict-null-sentinel -Woverloaded-virtual") -set(EXTRALIBS uuid rt dl) +set(EXTRALIBS uuid rt dl ${Boost_LIBS}) if(${WITH_PROFILER}) list(APPEND EXTRALIBS profiler) @@ -59,6 +59,11 @@ execute_process( OUTPUT_VARIABLE PYTHON_INSTDIR OUTPUT_STRIP_TRAILING_WHITESPACE) +if(HAVE_XIO) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -I${Xio_INCLUDE_DIR}") + list(APPEND EXTRALIBS ${Xio_LIBRARY} ibverbs rdmacm pthread rt) +endif(HAVE_XIO) + if(${WITH_TCMALLOC}) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-free") set(TCMALLOC_LIBS tcmalloc) @@ -116,6 +121,17 @@ set(crush_srcs add_subdirectory(json_spirit) +set(xio_common_srcs) +if(HAVE_XIO) + list(APPEND xio_common_srcs + msg/xio/XioConnection.cc + msg/xio/XioMsg.cc + msg/xio/XioPool.cc + msg/xio/XioMessenger.cc + msg/xio/XioPortal.cc + msg/xio/QueueStrategy.cc) +endif(HAVE_XIO) + set(libcommon_files ${CMAKE_BINARY_DIR}/src/include/ceph_ver.h ceph_ver.c diff --git a/src/erasure-code/lrc/CMakeLists.txt b/src/erasure-code/lrc/CMakeLists.txt index e6c799850e11..acb4b5470524 100644 --- a/src/erasure-code/lrc/CMakeLists.txt +++ b/src/erasure-code/lrc/CMakeLists.txt @@ -1,4 +1,4 @@ -# LRC plugin +# lrc plugin set(lrc_srcs ErasureCodePluginLrc.cc @@ -6,7 +6,8 @@ set(lrc_srcs $ ) -add_library(ec_LRC SHARED ${lrc_srcs}) -add_dependencies(ec_LRC ${CMAKE_SOURCE_DIR}/src/ceph_ver.h) -set_target_properties(ec_LRC PROPERTIES VERSION 1.0.0 SOVERSION 1) -install(TARGETS ec_LRC DESTINATION lib/erasure-code) +add_library(ec_lrc SHARED ${lrc_srcs}) +add_dependencies(ec_lrc ${CMAKE_SOURCE_DIR}/src/ceph_ver.h) +target_link_libraries(ec_lrc json_spirit) +set_target_properties(ec_lrc PROPERTIES VERSION 1.0.0 SOVERSION 1) +install(TARGETS ec_lrc DESTINATION lib/erasure-code) diff --git a/src/include/config-h.in.cmake b/src/include/config-h.in.cmake index a4afaa515752..fbd2e634178c 100644 --- a/src/include/config-h.in.cmake +++ b/src/include/config-h.in.cmake @@ -230,7 +230,7 @@ #cmakedefine WITH_RADOSGW /* Defined if XIO */ -#cmakedefine WITH_XIO +#cmakedefine HAVE_XIO /* Defined if CDS */ #cmakedefine HAVE_CDS