]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cmake/modules/BuildRocksDB.cmake: enable compressions for rocksdb 22181/head
authorKefu Chai <kchai@redhat.com>
Wed, 23 May 2018 15:20:21 +0000 (23:20 +0800)
committerKefu Chai <kchai@redhat.com>
Wed, 23 May 2018 15:59:41 +0000 (23:59 +0800)
we should enable them if they are found.

currently, we don't have bzip2 compressor plugin, so it's not detected
in the cmake script. we can always enable it for rocksdb in future.

Fixes: http://tracker.ceph.com/issues/24025
Signed-off-by: Kefu Chai <kchai@redhat.com>
cmake/modules/BuildRocksDB.cmake
src/kv/CMakeLists.txt

index 2a627e8a1c2376364c214c56e140c89deac063c9..71a1e2a1a2c6e6ce16d6a7ffc20f6ad9e4ef4d07 100644 (file)
@@ -13,6 +13,9 @@ function(do_build_rocksdb)
     list(APPEND ROCKSDB_CMAKE_ARGS -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER})
   endif()
 
+  list(APPEND ROCKSDB_CMAKE_ARGS -DWITH_SNAPPY=${SNAPPY_FOUND})
+  list(APPEND ROCKSDB_CMAKE_ARGS -DWITH_LZ4=${LZ4_FOUND})
+  list(APPEND ROCKSDB_CMAKE_ARGS -DWITH_ZLIB=${ZLIB_FOUND})
   list(APPEND ROCKSDB_CMAKE_ARGS -DPORTABLE=ON)
   list(APPEND ROCKSDB_CMAKE_ARGS -DCMAKE_AR=${CMAKE_AR})
   list(APPEND ROCKSDB_CMAKE_ARGS -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE})
index 724cd2d6f080134df47d1e9852764645b72426ab..c20bb5e4099952658e02afae0c545cb195f2e84e 100644 (file)
@@ -12,3 +12,6 @@ add_library(kv STATIC $<TARGET_OBJECTS:kv_objs>)
 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})
+if(WITH_LZ4)
+  target_link_libraries(kv ${LZ4_LIBRARY})
+endif()