Skip to content

Commit

Permalink
cmake/modules/BuildRocksDB.cmake: enable compressions for rocksdb
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
tchaikov committed May 23, 2018
1 parent 9d0e6da commit 71462dd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmake/modules/BuildRocksDB.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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})
Expand Down
3 changes: 3 additions & 0 deletions src/kv/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()

0 comments on commit 71462dd

Please sign in to comment.