From: Kefu Chai Date: Wed, 25 Jul 2018 10:51:49 +0000 (+0800) Subject: cmake: do not link libs against ${ALLOC_LIBS} X-Git-Tag: v14.0.1~722^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=2e012870315e5a08e90c27f14666e8518b94caef;p=ceph.git cmake: do not link libs against ${ALLOC_LIBS} let libcommon or libceph-common take care of this. Signed-off-by: Kefu Chai --- diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 48759883c1e4..fdadb155e210 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -448,8 +448,7 @@ if(WITH_DPDK) endif() add_library(common STATIC ${ceph_common_objs}) -target_link_libraries(common - PRIVATE ${ceph_common_deps}) +target_link_libraries(common ${ceph_common_deps}) add_library(ceph-common SHARED ${ceph_common_objs}) target_link_libraries(ceph-common ${ceph_common_deps}) @@ -542,7 +541,7 @@ set(ceph_osd_srcs 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} ${ALLOC_LIBS}) + ${BLKID_LIBRARIES}) if(WITH_FUSE) target_link_libraries(ceph-osd ${FUSE_LIBRARIES}) endif() @@ -683,7 +682,7 @@ if(WITH_FUSE) ceph_fuse.cc client/fuse_ll.cc) add_executable(ceph-fuse ${ceph_fuse_srcs}) - target_link_libraries(ceph-fuse ${ALLOC_LIBS} ${FUSE_LIBRARIES} + target_link_libraries(ceph-fuse ${FUSE_LIBRARIES} client ceph-common global-static) set_target_properties(ceph-fuse PROPERTIES COMPILE_FLAGS "-I${FUSE_INCLUDE_DIRS}" diff --git a/src/kv/CMakeLists.txt b/src/kv/CMakeLists.txt index c20bb5e40999..215b80d56d80 100644 --- a/src/kv/CMakeLists.txt +++ b/src/kv/CMakeLists.txt @@ -11,7 +11,7 @@ add_library(kv_objs OBJECT ${kv_srcs}) add_library(kv STATIC $) target_include_directories(kv_objs SYSTEM BEFORE PUBLIC ${ROCKSDB_INCLUDE_DIR}) target_include_directories(kv SYSTEM BEFORE PUBLIC ${ROCKSDB_INCLUDE_DIR}) -target_link_libraries(kv ${LEVELDB_LIBRARIES} ${ROCKSDB_LIBRARIES} ${ALLOC_LIBS} ${SNAPPY_LIBRARIES} ${ZLIB_LIBRARIES}) +target_link_libraries(kv ${LEVELDB_LIBRARIES} ${ROCKSDB_LIBRARIES} ${SNAPPY_LIBRARIES} ${ZLIB_LIBRARIES}) if(WITH_LZ4) target_link_libraries(kv ${LZ4_LIBRARY}) endif() diff --git a/src/mds/CMakeLists.txt b/src/mds/CMakeLists.txt index 63c2bd5f2923..025dbdd7f2b8 100644 --- a/src/mds/CMakeLists.txt +++ b/src/mds/CMakeLists.txt @@ -44,4 +44,4 @@ set(mds_srcs ${CMAKE_SOURCE_DIR}/src/osdc/Journaler.cc) add_library(mds STATIC ${mds_srcs}) target_link_libraries(mds PRIVATE - heap_profiler cpu_profiler ${ALLOC_LIBS} osdc liblua) + heap_profiler cpu_profiler osdc liblua) diff --git a/src/mgr/CMakeLists.txt b/src/mgr/CMakeLists.txt index 5e061bf95c65..3ed9a960d519 100644 --- a/src/mgr/CMakeLists.txt +++ b/src/mgr/CMakeLists.txt @@ -24,7 +24,7 @@ target_include_directories(ceph-mgr SYSTEM PRIVATE "${PYTHON_INCLUDE_DIRS}") target_link_libraries(ceph-mgr osdc client heap_profiler global-static ceph-common - Boost::python ${MGR_PYTHON_LIBRARIES} ${CMAKE_DL_LIBS} ${ALLOC_LIBS}) + Boost::python ${MGR_PYTHON_LIBRARIES} ${CMAKE_DL_LIBS}) set_target_properties(ceph-mgr PROPERTIES POSITION_INDEPENDENT_CODE ${EXE_LINKER_USE_PIE}) install(TARGETS ceph-mgr DESTINATION bin) diff --git a/src/mon/CMakeLists.txt b/src/mon/CMakeLists.txt index 1f835a22c715..ca73bc04746b 100644 --- a/src/mon/CMakeLists.txt +++ b/src/mon/CMakeLists.txt @@ -26,4 +26,4 @@ set(lib_mon_srcs add_library(mon STATIC ${lib_mon_srcs} $) -target_link_libraries(mon heap_profiler ${ALLOC_LIBS}) +target_link_libraries(mon heap_profiler)