mirror of
https://github.com/ceph/ceph
synced 2025-02-19 17:08:05 +00:00
Merge pull request #15376 from tchaikov/wip-remove-boost-submodule
cmake: build boost as an external project Reviewed-by: Casey Bodley <cbodley@redhat.com>
This commit is contained in:
commit
1e1b108bb6
@ -22,7 +22,15 @@ endif()
|
||||
if(POLICY CMP0065)
|
||||
cmake_policy(SET CMP0065 NEW)
|
||||
endif()
|
||||
|
||||
if(POLICY CMP0051)
|
||||
# cmake 3.1 and higher include generator expressions in SOURCES property.
|
||||
# in BuildBoost.cmake, get_target_property(<var> <target> SOURCES) is used
|
||||
# to retrieve the source files of a target. in that case, we are only
|
||||
# interested in the *source* files. and i don't want to bother stripping off
|
||||
# the TARGET_OBJECTS elements from the returned SOURCES. so let's stick with
|
||||
# the old behavior now.
|
||||
cmake_policy(SET CMP0051 OLD)
|
||||
endif()
|
||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules/")
|
||||
|
||||
if(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||
@ -534,78 +542,26 @@ if(WITH_RADOSGW_BEAST_FRONTEND)
|
||||
list(APPEND BOOST_COMPONENTS coroutine context)
|
||||
endif()
|
||||
|
||||
if (WITH_SYSTEM_BOOST)
|
||||
set(Boost_USE_MULTITHREADED ON)
|
||||
# require minimally the bundled version
|
||||
if(WITH_SYSTEM_BOOST)
|
||||
if(ENABLE_SHARED)
|
||||
set(Boost_USE_STATIC_LIBS OFF)
|
||||
else()
|
||||
set(Boost_USE_STATIC_LIBS ON)
|
||||
endif()
|
||||
find_package(Boost 1.61 COMPONENTS ${BOOST_COMPONENTS} REQUIRED)
|
||||
else()
|
||||
set(BOOST_CFLAGS "-fPIC -w") # check on arm, etc <---XXX
|
||||
set(BOOST_J 1 CACHE STRING
|
||||
"max jobs for Boost build") # override w/-DBOOST_J=<n>
|
||||
message(STATUS "BUILDING Boost Libraries at j ${BOOST_J}")
|
||||
# 1. prep w/required components
|
||||
set(BOOST_SOURCE_DIR "${PROJECT_SOURCE_DIR}/src/boost")
|
||||
set(BOOST_PREFIX "${PROJECT_BINARY_DIR}/boost")
|
||||
set(BOOST_BUILD "${PROJECT_BINARY_DIR}/boost-build")
|
||||
list(APPEND BOOST_COMPONENTS ${BOOST_HEADER_COMPONENTS})
|
||||
string(REPLACE ";" "," BOOST_WITH_LIBS "${BOOST_COMPONENTS}")
|
||||
execute_process(COMMAND "./bootstrap.sh"
|
||||
"--prefix=${BOOST_PREFIX}"
|
||||
"--with-libraries=${BOOST_WITH_LIBS}"
|
||||
WORKING_DIRECTORY ${BOOST_SOURCE_DIR})
|
||||
set(BOOST_ROOT "${BOOST_PREFIX}")
|
||||
set(b2 ./b2
|
||||
--build-dir=${BOOST_BUILD} -j${BOOST_J})
|
||||
if(CMAKE_VERBOSE_MAKEFILE)
|
||||
list(APPEND b2 -d1)
|
||||
else()
|
||||
list(APPEND b2 -d0)
|
||||
endif()
|
||||
list(APPEND b2
|
||||
variant=release link=static threading=multi cxxflags=${BOOST_CFLAGS})
|
||||
if(NOT CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL CMAKE_SYSTEM_PROCESSOR)
|
||||
# we are crosscompiling
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL GNU)
|
||||
set(b2_cc gcc)
|
||||
elseif(CMAKE_CXX_COMPILER_ID STREQUAL Clang)
|
||||
set(b2_cc clang)
|
||||
else()
|
||||
message(SEND_ERROR "unknown compiler: ${CMAKE_CXX_COMPILER_ID}")
|
||||
endif()
|
||||
# edit the config.jam so, b2 will be able to use the specified toolset
|
||||
execute_process(
|
||||
COMMAND
|
||||
sed -i
|
||||
"s|using ${b2_cc} ;|using ${b2_cc} : ${CMAKE_SYSTEM_PROCESSOR} : ${CMAKE_CXX_COMPILER} ;|"
|
||||
${PROJECT_SOURCE_DIR}/src/boost/project-config.jam)
|
||||
# use ${CMAKE_SYSTEM_PROCESSOR} as the version identifier of compiler
|
||||
list(APPEND b2 toolset=${b2_cc}-${CMAKE_SYSTEM_PROCESSOR})
|
||||
endif()
|
||||
# 2. install headers
|
||||
execute_process(COMMAND
|
||||
${b2}
|
||||
headers
|
||||
WORKING_DIRECTORY ${BOOST_SOURCE_DIR})
|
||||
# 3. build and install libs
|
||||
execute_process(COMMAND
|
||||
${b2}
|
||||
install
|
||||
WORKING_DIRECTORY ${BOOST_SOURCE_DIR})
|
||||
# 4. set hints for FindBoost.cmake
|
||||
set(Boost_USE_STATIC_LIBS ON)
|
||||
set(Boost_NO_SYSTEM_PATHS ON)
|
||||
include_directories(BEFORE ${BOOST_PREFIX}/include)
|
||||
set(BOOST_ROOT ${BOOST_PREFIX})
|
||||
set(Boost_NO_SYSTEM_PATHS ON)
|
||||
include(BuildBoost)
|
||||
build_boost(1.63
|
||||
COMPONENTS ${BOOST_COMPONENTS} ${BOOST_HEADER_COMPONENTS})
|
||||
include_directories(BEFORE SYSTEM ${Boost_INCLUDE_DIRS})
|
||||
endif()
|
||||
|
||||
set(Boost_USE_MULTITHREADED ON)
|
||||
|
||||
# require minimally the bundled version
|
||||
find_package(Boost 1.61 COMPONENTS ${BOOST_COMPONENTS} REQUIRED)
|
||||
include_directories(SYSTEM ${Boost_INCLUDE_DIRS})
|
||||
include_directories(SYSTEM ${PROJECT_BINARY_DIR}/include)
|
||||
|
||||
find_package(Threads REQUIRED)
|
||||
|
184
cmake/modules/BuildBoost.cmake
Normal file
184
cmake/modules/BuildBoost.cmake
Normal file
@ -0,0 +1,184 @@
|
||||
# This module builds Boost
|
||||
# executables are. It sets the following variables:
|
||||
#
|
||||
# Boost_FOUND : boolean - system has Boost
|
||||
# Boost_LIBRARIES : list(filepath) - the libraries needed to use Boost
|
||||
# Boost_INCLUDE_DIRS : list(path) - the Boost include directories
|
||||
#
|
||||
# Following hints are respected
|
||||
#
|
||||
# Boost_USE_STATIC_LIBS : boolean (default: OFF)
|
||||
# Boost_USE_MULTITHREADED : boolean (default: OFF)
|
||||
# BOOST_J: integer (defanult 1)
|
||||
|
||||
function(do_build_boost version)
|
||||
cmake_parse_arguments(Boost_BUILD "" "" COMPONENTS ${ARGN})
|
||||
set(boost_features "variant=release")
|
||||
if(Boost_USE_MULTITHREADED)
|
||||
list(APPEND boost_features "threading=multi")
|
||||
else()
|
||||
list(APPEND boost_features "threading=single")
|
||||
endif()
|
||||
if(Boost_USE_STATIC_LIBS)
|
||||
list(APPEND boost_features "link=static")
|
||||
else()
|
||||
list(APPEND boost_features "link=shared")
|
||||
endif()
|
||||
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
list(APPEND boost_features "address-model=64")
|
||||
else()
|
||||
list(APPEND boost_features "address-model=32")
|
||||
endif()
|
||||
set(BOOST_CXXFLAGS "-fPIC -w") # check on arm, etc <---XXX
|
||||
list(APPEND boost_features "cxxflags=${BOOST_CXXFLAGS}")
|
||||
|
||||
string(REPLACE ";" "," boost_with_libs "${Boost_BUILD_COMPONENTS}")
|
||||
# build b2 and prepare the project-config.jam for boost
|
||||
set(configure_command
|
||||
./bootstrap.sh --prefix=<INSTALL_DIR>
|
||||
--with-libraries=${boost_with_libs})
|
||||
|
||||
set(b2 ./b2)
|
||||
if(BOOST_J)
|
||||
message(STATUS "BUILDING Boost Libraries at j ${BOOST_J}")
|
||||
list(APPEND b2 -j${BOOST_J})
|
||||
endif()
|
||||
if(CMAKE_VERBOSE_MAKEFILE)
|
||||
list(APPEND b2 -d1)
|
||||
else()
|
||||
list(APPEND b2 -d0)
|
||||
endif()
|
||||
|
||||
if(NOT CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL CMAKE_SYSTEM_PROCESSOR)
|
||||
# we are crosscompiling
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL GNU)
|
||||
set(b2_cc gcc)
|
||||
elseif(CMAKE_CXX_COMPILER_ID STREQUAL Clang)
|
||||
set(b2_cc clang)
|
||||
else()
|
||||
message(SEND_ERROR "unknown compiler: ${CMAKE_CXX_COMPILER_ID}")
|
||||
endif()
|
||||
# edit the config.jam so, b2 will be able to use the specified toolset
|
||||
execute_process(
|
||||
COMMAND
|
||||
sed -i
|
||||
"s|using ${b2_cc} ;|using ${b2_cc} : ${CMAKE_SYSTEM_PROCESSOR} : ${CMAKE_CXX_COMPILER} ;|"
|
||||
${PROJECT_SOURCE_DIR}/src/boost/project-config.jam)
|
||||
# use ${CMAKE_SYSTEM_PROCESSOR} as the version identifier of compiler
|
||||
list(APPEND b2 toolset=${b2_cc}-${CMAKE_SYSTEM_PROCESSOR})
|
||||
endif()
|
||||
|
||||
set(build_command
|
||||
${b2} headers stage
|
||||
#"--buildid=ceph" # changes lib names--can omit for static
|
||||
${boost_features})
|
||||
set(install_command
|
||||
${b2} install)
|
||||
set(boost_root_dir "${CMAKE_BINARY_DIR}/boost")
|
||||
if(EXISTS "${PROJECT_SOURCE_DIR}/src/boost/libs/config/include/boost/config.hpp")
|
||||
message(STATUS "boost already in src")
|
||||
set(source_dir
|
||||
SOURCE_DIR "${PROJECT_SOURCE_DIR}/src/boost")
|
||||
elseif(version VERSION_GREATER 1.63)
|
||||
message(FATAL_ERROR "Unknown BOOST_REQUESTED_VERSION: ${version}")
|
||||
else()
|
||||
message(STATUS "boost will be downloaded from sf.net")
|
||||
set(boost_version 1.63.0)
|
||||
set(boost_md5 1c837ecd990bb022d07e7aab32b09847)
|
||||
string(REPLACE "." "_" boost_version_underscore ${boost_version} )
|
||||
set(boost_url http://downloads.sourceforge.net/project/boost/boost/${boost_version}/boost_${boost_version_underscore}.tar.bz2)
|
||||
set(source_dir
|
||||
URL ${boost_url}
|
||||
URL_MD5 ${boost_md5})
|
||||
if(CMAKE_VERSION VERSION_GREATER 3.0)
|
||||
list(APPEND source_dir DOWNLOAD_NO_PROGRESS 1)
|
||||
endif()
|
||||
endif()
|
||||
# build all components in a single shot
|
||||
include(ExternalProject)
|
||||
ExternalProject_Add(Boost
|
||||
${source_dir}
|
||||
CONFIGURE_COMMAND CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} ${configure_command}
|
||||
BUILD_COMMAND CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} ${build_command}
|
||||
BUILD_IN_SOURCE 1
|
||||
INSTALL_COMMAND ${install_command}
|
||||
PREFIX "${boost_root_dir}")
|
||||
endfunction()
|
||||
|
||||
macro(build_boost version)
|
||||
do_build_boost(version ${ARGN})
|
||||
ExternalProject_Get_Property(Boost install_dir)
|
||||
set(Boost_INCLUDE_DIRS ${install_dir}/include)
|
||||
set(Boost_INCLUDE_DIR ${install_dir}/include)
|
||||
# create the directory so cmake won't complain when looking at the imported
|
||||
# target
|
||||
file(MAKE_DIRECTORY ${Boost_INCLUDE_DIRS})
|
||||
cmake_parse_arguments(Boost_BUILD "" "" COMPONENTS ${ARGN})
|
||||
foreach(c ${Boost_BUILD_COMPONENTS})
|
||||
string(TOUPPER ${c} upper_c)
|
||||
if(Boost_USE_STATIC_LIBS)
|
||||
add_library(Boost::${c} STATIC IMPORTED)
|
||||
else()
|
||||
add_library(Boost::${c} SHARED IMPORTED)
|
||||
endif()
|
||||
add_dependencies(Boost::${c} Boost)
|
||||
if(Boost_USE_STATIC_LIBS)
|
||||
set(Boost_${upper_c}_LIBRARY
|
||||
${install_dir}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}boost_${c}${CMAKE_STATIC_LIBRARY_SUFFIX})
|
||||
else()
|
||||
set(Boost_${upper_c}_LIBRARY
|
||||
${install_dir}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}boost_${c}${CMAKE_SHARED_LIBRARY_SUFFIX})
|
||||
endif()
|
||||
set_target_properties(Boost::${c} PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${Boost_INCLUDE_DIRS}"
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
|
||||
IMPORTED_LOCATION "${Boost_${upper_c}_LIBRARY}")
|
||||
list(APPEND Boost_LIBRARIES ${Boost_${upper_c}_LIBRARY})
|
||||
endforeach()
|
||||
|
||||
# for header-only libraries
|
||||
if(CMAKE_VERSION VERSION_LESS 3.0)
|
||||
# only ALIAS and INTERFACE target names allow ":" in it, but
|
||||
# INTERFACE library is not allowed until cmake 3.1
|
||||
add_custom_target(Boost.boost DEPENDS Boost)
|
||||
else()
|
||||
add_library(Boost.boost INTERFACE IMPORTED)
|
||||
set_target_properties(Boost.boost PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${Boost_INCLUDE_DIRS}")
|
||||
add_dependencies(Boost.boost Boost)
|
||||
endif()
|
||||
find_package_handle_standard_args(Boost DEFAULT_MSG
|
||||
Boost_INCLUDE_DIRS Boost_LIBRARIES)
|
||||
mark_as_advanced(Boost_LIBRARIES BOOST_INCLUDE_DIRS)
|
||||
endmacro()
|
||||
|
||||
function(maybe_add_boost_dep target)
|
||||
get_target_property(imported ${target} IMPORTED)
|
||||
if(imported)
|
||||
return()
|
||||
endif()
|
||||
get_target_property(type ${target} TYPE)
|
||||
if(NOT type MATCHES "OBJECT_LIBRARY|STATIC_LIBRARY|SHARED_LIBRARY|EXECUTABLE")
|
||||
return()
|
||||
endif()
|
||||
get_target_property(sources ${target} SOURCES)
|
||||
foreach(src ${sources})
|
||||
get_filename_component(ext ${src} EXT)
|
||||
# assuming all cxx source files include boost header(s)
|
||||
if(ext MATCHES ".cc|.cpp|.cxx")
|
||||
add_dependencies(${target} Boost.boost)
|
||||
return()
|
||||
endif()
|
||||
endforeach()
|
||||
endfunction()
|
||||
|
||||
# override add_library() to add Boost headers dependency
|
||||
function(add_library target)
|
||||
_add_library(${target} ${ARGN})
|
||||
maybe_add_boost_dep(${target})
|
||||
endfunction()
|
||||
|
||||
function(add_executable target)
|
||||
_add_executable(${target} ${ARGN})
|
||||
maybe_add_boost_dep(${target})
|
||||
endfunction()
|
@ -534,6 +534,7 @@ set(libcommon_files
|
||||
common/fs_types.cc
|
||||
common/dns_resolve.cc
|
||||
common/hostname.cc
|
||||
common/util.cc
|
||||
arch/probe.cc
|
||||
${auth_files}
|
||||
${mds_files})
|
||||
@ -575,11 +576,6 @@ if(WITH_LTTNG AND WITH_EVENTTRACE)
|
||||
list(APPEND libcommon_files common/EventTrace.cc)
|
||||
endif()
|
||||
|
||||
set(mon_common_files
|
||||
auth/AuthSessionHandler.cc
|
||||
auth/cephx/CephxSessionHandler.cc
|
||||
erasure-code/ErasureCodePlugin.cc)
|
||||
add_library(mon_common_objs OBJECT ${mon_common_files})
|
||||
set(common_mountcephfs_files
|
||||
common/armor.c
|
||||
common/safe_io.c
|
||||
@ -607,13 +603,13 @@ set(ceph_common_objs
|
||||
$<TARGET_OBJECTS:crush_objs>)
|
||||
set(ceph_common_deps
|
||||
json_spirit erasure_code rt ${LIB_RESOLV}
|
||||
${Boost_THREAD_LIBRARY}
|
||||
${Boost_SYSTEM_LIBRARY}
|
||||
${Boost_REGEX_LIBRARY}
|
||||
${Boost_RANDOM_LIBRARY}
|
||||
${Boost_PROGRAM_OPTIONS_LIBRARY}
|
||||
${Boost_DATE_TIME_LIBRARY}
|
||||
${Boost_IOSTREAMS_LIBRARY}
|
||||
Boost::thread
|
||||
Boost::system
|
||||
Boost::regex
|
||||
Boost::random
|
||||
Boost::program_options
|
||||
Boost::date_time
|
||||
Boost::iostreams
|
||||
${BLKID_LIBRARIES}
|
||||
${Backtrace_LIBRARIES}
|
||||
${BLKIN_LIBRARIES}
|
||||
@ -689,7 +685,7 @@ if (WITH_MGR)
|
||||
$<TARGET_OBJECTS:heap_profiler_objs>)
|
||||
target_include_directories(ceph-mgr PRIVATE "${PYTHON_INCLUDE_DIRS}")
|
||||
target_link_libraries(ceph-mgr osdc client global-static common
|
||||
${Boost_PYTHON_LIBRARY} ${PYTHON_LIBRARIES} ${BLKID_LIBRARIES} ${CMAKE_DL_LIBS} ${ALLOC_LIBS})
|
||||
Boost::python ${PYTHON_LIBRARIES} ${BLKID_LIBRARIES} ${CMAKE_DL_LIBS} ${ALLOC_LIBS})
|
||||
install(TARGETS ceph-mgr DESTINATION bin)
|
||||
endif (WITH_MGR)
|
||||
|
||||
@ -769,10 +765,6 @@ target_link_libraries(ceph-dencoder
|
||||
install(TARGETS ceph-dencoder DESTINATION bin)
|
||||
|
||||
# Monitor
|
||||
set(common_util_src
|
||||
common/util.cc)
|
||||
add_library(common_util_obj OBJECT ${common_util_src})
|
||||
|
||||
add_subdirectory(mon)
|
||||
set(ceph_mon_srcs
|
||||
ceph_mon.cc)
|
||||
@ -857,8 +849,7 @@ add_subdirectory(osd)
|
||||
|
||||
set(ceph_osd_srcs
|
||||
ceph_osd.cc)
|
||||
add_executable(ceph-osd ${ceph_osd_srcs}
|
||||
$<TARGET_OBJECTS:common_util_obj>)
|
||||
add_executable(ceph-osd ${ceph_osd_srcs})
|
||||
add_dependencies(ceph-osd erasure_code_plugins)
|
||||
target_link_libraries(ceph-osd osd os global-static common
|
||||
${BLKID_LIBRARIES} ${RDMA_LIBRARIES})
|
||||
@ -870,10 +861,9 @@ install(TARGETS ceph-osd DESTINATION bin)
|
||||
add_subdirectory(mds)
|
||||
set(ceph_mds_srcs
|
||||
ceph_mds.cc)
|
||||
add_executable(ceph-mds ${ceph_mds_srcs}
|
||||
$<TARGET_OBJECTS:common_util_obj>)
|
||||
add_executable(ceph-mds ${ceph_mds_srcs})
|
||||
target_link_libraries(ceph-mds mds ${CMAKE_DL_LIBS} global-static common
|
||||
${Boost_THREAD_LIBRARY})
|
||||
Boost::thread)
|
||||
install(TARGETS ceph-mds DESTINATION bin)
|
||||
|
||||
add_subdirectory(erasure-code)
|
||||
|
@ -15,6 +15,7 @@
|
||||
#ifndef CEPH_LOGCLIENT_H
|
||||
#define CEPH_LOGCLIENT_H
|
||||
|
||||
#include <atomic>
|
||||
#include "common/LogEntry.h"
|
||||
#include "common/Mutex.h"
|
||||
|
||||
|
@ -14,6 +14,7 @@
|
||||
#ifndef TRACKEDREQUEST_H_
|
||||
#define TRACKEDREQUEST_H_
|
||||
|
||||
#include <atomic>
|
||||
#include "common/histogram.h"
|
||||
#include "msg/Message.h"
|
||||
#include "common/RWLock.h"
|
||||
|
@ -39,6 +39,5 @@ set(mds_srcs
|
||||
${CMAKE_SOURCE_DIR}/src/common/TrackedOp.cc
|
||||
${CMAKE_SOURCE_DIR}/src/osdc/Journaler.cc)
|
||||
add_library(mds STATIC ${mds_srcs}
|
||||
$<TARGET_OBJECTS:heap_profiler_objs>
|
||||
$<TARGET_OBJECTS:common_util_obj>)
|
||||
$<TARGET_OBJECTS:heap_profiler_objs>)
|
||||
target_link_libraries(mds ${ALLOC_LIBS} osdc liblua)
|
||||
|
@ -1,7 +1,3 @@
|
||||
set(osd_mon_files
|
||||
Monitor.cc)
|
||||
add_library(osd_mon_objs OBJECT ${osd_mon_files})
|
||||
|
||||
set(lib_mon_srcs
|
||||
${CMAKE_SOURCE_DIR}/src/auth/cephx/CephxKeyServer.cc
|
||||
${CMAKE_SOURCE_DIR}/src/auth/cephx/CephxServiceHandler.cc
|
||||
@ -14,6 +10,7 @@ set(lib_mon_srcs
|
||||
FSCommands.cc
|
||||
MgrMonitor.cc
|
||||
MgrStatMonitor.cc
|
||||
Monitor.cc
|
||||
MonmapMonitor.cc
|
||||
LogMonitor.cc
|
||||
AuthMonitor.cc
|
||||
@ -23,7 +20,8 @@ set(lib_mon_srcs
|
||||
PGMonitor.cc
|
||||
PGMap.cc
|
||||
ConfigKeyService.cc)
|
||||
add_library(mon STATIC ${lib_mon_srcs} $<TARGET_OBJECTS:mon_common_objs>
|
||||
$<TARGET_OBJECTS:kv_objs> $<TARGET_OBJECTS:osd_mon_objs>
|
||||
$<TARGET_OBJECTS:common_util_obj> $<TARGET_OBJECTS:heap_profiler_objs>)
|
||||
add_library(mon STATIC
|
||||
${lib_mon_srcs}
|
||||
$<TARGET_OBJECTS:kv_objs>
|
||||
$<TARGET_OBJECTS:heap_profiler_objs>)
|
||||
target_link_libraries(mon ${ALLOC_LIBS})
|
||||
|
@ -37,11 +37,9 @@ if(HAS_VTA)
|
||||
PROPERTIES COMPILE_FLAGS -fno-var-tracking-assignments)
|
||||
endif()
|
||||
add_library(osd STATIC ${osd_srcs}
|
||||
$<TARGET_OBJECTS:osd_mon_objs>
|
||||
$<TARGET_OBJECTS:cls_references_objs>
|
||||
$<TARGET_OBJECTS:global_common_objs>
|
||||
$<TARGET_OBJECTS:heap_profiler_objs>
|
||||
$<TARGET_OBJECTS:common_util_obj>)
|
||||
$<TARGET_OBJECTS:heap_profiler_objs>)
|
||||
target_link_libraries(osd ${LEVELDB_LIBRARIES} ${CMAKE_DL_LIBS} ${ALLOC_LIBS})
|
||||
if(WITH_LTTNG)
|
||||
add_dependencies(osd osd-tp pg-tp)
|
||||
|
@ -36,7 +36,7 @@ if(${WITH_BABELTRACE})
|
||||
global
|
||||
babeltrace
|
||||
babeltrace-ctf
|
||||
${Boost_DATE_TIME_LIBRARY}
|
||||
Boost::date_time
|
||||
)
|
||||
install(TARGETS rbd-replay-prep DESTINATION bin)
|
||||
endif(${WITH_BABELTRACE})
|
||||
|
@ -172,8 +172,8 @@ add_library(radosgw_a STATIC ${radosgw_srcs}
|
||||
target_link_libraries(radosgw_a rgw_a ${SSL_LIBRARIES})
|
||||
if(WITH_RADOSGW_BEAST_FRONTEND)
|
||||
target_link_libraries(radosgw_a
|
||||
${Boost_COROUTINE_LIBRARY}
|
||||
${Boost_CONTEXT_LIBRARY})
|
||||
Boost::coroutine
|
||||
Boost::context)
|
||||
endif()
|
||||
|
||||
add_executable(radosgw rgw_main.cc)
|
||||
|
@ -147,7 +147,7 @@ add_executable(ceph_omapbench
|
||||
)
|
||||
target_link_libraries(ceph_omapbench
|
||||
librados
|
||||
${Boost_PROGRAM_OPTIONS_LIBRARY}
|
||||
Boost::program_options
|
||||
global
|
||||
${BLKID_LIBRARIES}
|
||||
${CMAKE_DL_LIBS}
|
||||
@ -201,7 +201,7 @@ if(${WITH_RADOSGW})
|
||||
cls_rgw_client
|
||||
cls_user_client
|
||||
cls_lock_client
|
||||
${Boost_REGEX_LIBRARY}
|
||||
Boost::regex
|
||||
${BLKID_LIBRARIES}
|
||||
${CURL_LIBRARIES}
|
||||
${EXPAT_LIBRARIES}
|
||||
@ -231,7 +231,7 @@ if(${WITH_RADOSGW})
|
||||
cls_rgw_client
|
||||
cls_user_client
|
||||
cls_lock_client
|
||||
${Boost_REGEX_LIBRARY}
|
||||
Boost::regex
|
||||
${BLKID_LIBRARIES}
|
||||
${CURL_LIBRARIES}
|
||||
${EXPAT_LIBRARIES}
|
||||
|
@ -8,7 +8,7 @@ set(smalliobench_srcs
|
||||
add_executable(ceph_smalliobench
|
||||
${smalliobench_srcs}
|
||||
)
|
||||
target_link_libraries(ceph_smalliobench librados ${Boost_PROGRAM_OPTIONS_LIBRARY} global
|
||||
target_link_libraries(ceph_smalliobench librados Boost::program_options global
|
||||
${BLKID_LIBRARIES} ${CMAKE_DL_LIBS})
|
||||
|
||||
# ceph_smalliobenchrbd
|
||||
@ -27,7 +27,7 @@ if(WITH_RBD)
|
||||
librados
|
||||
os
|
||||
global
|
||||
${Boost_PROGRAM_OPTIONS_LIBRARY}
|
||||
Boost::program_options
|
||||
${BLKID_LIBRARIES}
|
||||
${CMAKE_DL_LIBS}
|
||||
)
|
||||
@ -50,7 +50,7 @@ set(ceph_smalliobenchfs_srcs
|
||||
add_executable(ceph_smalliobenchfs
|
||||
${ceph_smalliobenchfs_srcs}
|
||||
)
|
||||
target_link_libraries(ceph_smalliobenchfs librados ${Boost_PROGRAM_OPTIONS_LIBRARY} os global
|
||||
target_link_libraries(ceph_smalliobenchfs librados Boost::program_options os global
|
||||
${BLKID_LIBRARIES} ${CMAKE_DL_LIBS})
|
||||
|
||||
# ceph_smalliobenchdumb
|
||||
@ -63,7 +63,7 @@ set(smalliobenchdumb_srcs
|
||||
add_executable(ceph_smalliobenchdumb
|
||||
${smalliobenchdumb_srcs}
|
||||
)
|
||||
target_link_libraries(ceph_smalliobenchdumb librados ${Boost_PROGRAM_OPTIONS_LIBRARY} os global
|
||||
target_link_libraries(ceph_smalliobenchdumb librados Boost::program_options os global
|
||||
${BLKID_LIBRARIES} ${CMAKE_DL_LIBS})
|
||||
|
||||
# ceph_tpbench
|
||||
@ -73,7 +73,7 @@ set(tpbench_srcs
|
||||
add_executable(ceph_tpbench
|
||||
${tpbench_srcs}
|
||||
)
|
||||
target_link_libraries(ceph_tpbench librados ${Boost_PROGRAM_OPTIONS_LIBRARY} global
|
||||
target_link_libraries(ceph_tpbench librados Boost::program_options global
|
||||
${BLKID_LIBRARIES} ${CMAKE_DL_LIBS})
|
||||
|
||||
install(TARGETS
|
||||
|
@ -6,15 +6,15 @@ add_ceph_test(test-erasure-eio.sh ${CMAKE_CURRENT_SOURCE_DIR}/test-erasure-eio.s
|
||||
add_executable(ceph_erasure_code_benchmark
|
||||
${CMAKE_SOURCE_DIR}/src/erasure-code/ErasureCode.cc
|
||||
ceph_erasure_code_benchmark.cc)
|
||||
target_link_libraries(ceph_erasure_code_benchmark ceph-common ${Boost_PROGRAM_OPTIONS_LIBRARY} global ${CMAKE_DL_LIBS})
|
||||
target_link_libraries(ceph_erasure_code_benchmark ceph-common Boost::program_options global ${CMAKE_DL_LIBS})
|
||||
install(TARGETS ceph_erasure_code_benchmark
|
||||
DESTINATION bin)
|
||||
|
||||
add_executable(ceph_erasure_code_non_regression ceph_erasure_code_non_regression.cc)
|
||||
target_link_libraries(ceph_erasure_code_non_regression ceph-common ${Boost_PROGRAM_OPTIONS_LIBRARY} global ${CMAKE_DL_LIBS})
|
||||
target_link_libraries(ceph_erasure_code_non_regression ceph-common Boost::program_options global ${CMAKE_DL_LIBS})
|
||||
|
||||
add_executable(ceph_erasure_code ceph_erasure_code.cc)
|
||||
target_link_libraries(ceph_erasure_code ceph-common ${Boost_PROGRAM_OPTIONS_LIBRARY} global ${CMAKE_DL_LIBS})
|
||||
target_link_libraries(ceph_erasure_code ceph-common Boost::program_options global ${CMAKE_DL_LIBS})
|
||||
install(TARGETS ceph_erasure_code
|
||||
DESTINATION bin)
|
||||
|
||||
|
@ -125,7 +125,7 @@ add_executable(ceph_test_rados_api_tier
|
||||
set_target_properties(ceph_test_rados_api_tier PROPERTIES COMPILE_FLAGS
|
||||
${UNITTEST_CXX_FLAGS})
|
||||
target_link_libraries(ceph_test_rados_api_tier
|
||||
global rados_a ${UNITTEST_LIBS} ${Boost_SYSTEM_LIBRARY} radostest)
|
||||
global rados_a ${UNITTEST_LIBS} Boost::system radostest)
|
||||
|
||||
# ceph_test_rados_api_snapshots
|
||||
add_executable(ceph_test_rados_api_snapshots
|
||||
|
@ -9,7 +9,6 @@ target_link_libraries(unittest_mds_authcap mds global ${BLKID_LIBRARIES})
|
||||
# unittest_mds_sessionfilter
|
||||
add_executable(unittest_mds_sessionfilter
|
||||
TestSessionFilter.cc
|
||||
$<TARGET_OBJECTS:common_util_obj>
|
||||
$<TARGET_OBJECTS:unit-main>
|
||||
)
|
||||
add_ceph_unittest(unittest_mds_sessionfilter ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_mds_sessionfilter)
|
||||
|
@ -23,11 +23,11 @@ target_link_libraries(ceph_radosacl librados global)
|
||||
install(TARGETS ceph_radosacl DESTINATION bin)
|
||||
|
||||
add_executable(ceph-osdomap-tool ceph_osdomap_tool.cc)
|
||||
target_link_libraries(ceph-osdomap-tool os global ${Boost_PROGRAM_OPTIONS_LIBRARY})
|
||||
target_link_libraries(ceph-osdomap-tool os global Boost::program_options)
|
||||
install(TARGETS ceph-osdomap-tool DESTINATION bin)
|
||||
|
||||
add_executable(ceph-monstore-tool ceph_monstore_tool.cc)
|
||||
target_link_libraries(ceph-monstore-tool os global ${Boost_PROGRAM_OPTIONS_LIBRARY})
|
||||
target_link_libraries(ceph-monstore-tool os global Boost::program_options)
|
||||
install(TARGETS ceph-monstore-tool DESTINATION bin)
|
||||
install(PROGRAMS
|
||||
ceph-monstore-update-crush.sh
|
||||
@ -38,7 +38,7 @@ add_executable(ceph-objectstore-tool
|
||||
ceph_objectstore_tool.cc
|
||||
rebuild_mondb.cc
|
||||
RadosDump.cc)
|
||||
target_link_libraries(ceph-objectstore-tool osd os global ${Boost_PROGRAM_OPTIONS_LIBRARY} ${CMAKE_DL_LIBS})
|
||||
target_link_libraries(ceph-objectstore-tool osd os global Boost::program_options ${CMAKE_DL_LIBS})
|
||||
if(WITH_FUSE)
|
||||
target_link_libraries(ceph-objectstore-tool fuse)
|
||||
endif(WITH_FUSE)
|
||||
|
@ -36,7 +36,6 @@ set(rbd_srcs
|
||||
action/Trash.cc
|
||||
action/Watch.cc)
|
||||
add_executable(rbd ${rbd_srcs}
|
||||
$<TARGET_OBJECTS:common_util_obj>
|
||||
$<TARGET_OBJECTS:common_texttable_obj>)
|
||||
set_target_properties(rbd PROPERTIES OUTPUT_NAME rbd)
|
||||
target_link_libraries(rbd librbd librados
|
||||
|
Loading…
Reference in New Issue
Block a user