Skip to content

Commit

Permalink
cmake: add xio
Browse files Browse the repository at this point in the history
Signed-off-by: Casey Bodley <[email protected]>
Signed-off-by: Matt Benjamin <[email protected]>
  • Loading branch information
cbodley authored and Matt Benjamin committed Jan 14, 2015
1 parent 610d66f commit aba35bc
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 8 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
18 changes: 17 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down
11 changes: 6 additions & 5 deletions src/erasure-code/lrc/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
# LRC plugin
# lrc plugin

set(lrc_srcs
ErasureCodePluginLrc.cc
ErasureCodeLrc.cc
$<TARGET_OBJECTS:erasure_code_objs>
)

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)
2 changes: 1 addition & 1 deletion src/include/config-h.in.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@
#cmakedefine WITH_RADOSGW

/* Defined if XIO */
#cmakedefine WITH_XIO
#cmakedefine HAVE_XIO

/* Defined if CDS */
#cmakedefine HAVE_CDS
Expand Down

0 comments on commit aba35bc

Please sign in to comment.