]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cmake: link libkv against common_prioritycache_obj
authorKefu Chai <kchai@redhat.com>
Mon, 3 Jun 2019 07:02:51 +0000 (15:02 +0800)
committerKefu Chai <kchai@redhat.com>
Mon, 3 Jun 2019 07:12:44 +0000 (15:12 +0800)
as both `kv/rocksdb_cache/BinnedLRUCache.cc` and
`kv/rocksdb_cache/ShardedCache.cc` uses `PriorityCache` which is in turn
offered by common_prioritycache_obj, we need to link libkv against the
latter.

libos uses `PriorityCache` as well, but since libos links against
libkv, so it's safe.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/kv/CMakeLists.txt
src/os/CMakeLists.txt

index 357b7b0e93ffde69d943275df4befc95068e88ab..c75bf332a2987580ee74fe5fc9a6fd06dd7ded73 100644 (file)
@@ -9,5 +9,7 @@ if (WITH_LEVELDB)
   list(APPEND kv_srcs LevelDBStore.cc)
 endif (WITH_LEVELDB)
 
-add_library(kv STATIC ${kv_srcs})
+add_library(kv STATIC ${kv_srcs}
+  $<TARGET_OBJECTS:common_prioritycache_obj>)
+
 target_link_libraries(kv ${LEVELDB_LIBRARIES} RocksDB::RocksDB)
index 53a3da247d366b839096f54325b50a4afa670e63..e65d7393f7ae5907898327aa97e5fcef9cab5ed0 100644 (file)
@@ -71,8 +71,7 @@ if(WITH_SPDK)
     bluestore/NVMEDevice.cc)
 endif()
 
-add_library(os STATIC ${libos_srcs}
-  $<TARGET_OBJECTS:common_prioritycache_obj>)
+add_library(os STATIC ${libos_srcs})
 
 target_link_libraries(os heap_profiler kv)