Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[rocksdb] Update rocksdb to 6.1.2, adds optional zstd feature #7304

Merged
merged 1 commit into from
Jul 17, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion ports/rocksdb/CONTROL
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Source: rocksdb
Version: 6.0.2
Version: 6.1.2
Homepage: https://github.com/facebook/rocksdb
Description: A library that provides an embeddable, persistent key-value store for fast storage
Default-Features: zlib
Expand All @@ -19,3 +19,7 @@ Description: zlib support in rocksdb
Feature: tbb
Build-Depends: tbb
Description: tbb support in rocksdb

Feature: zstd
Build-Depends: zstd
Description: zstd support in rocksdb
13 changes: 13 additions & 0 deletions ports/rocksdb/Findzstd.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
find_path(ZSTD_INCLUDE_DIR zstd.h)

find_library(ZSTD_LIBRARY_DEBUG NAMES zstd)
find_library(ZSTD_LIBRARY_RELEASE NAMES zstd)

include(SelectLibraryConfigurations)
select_library_configurations(ZSTD)

include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(
ZSTD DEFAULT_MSG
ZSTD_LIBRARY ZSTD_INCLUDE_DIR
)
11 changes: 9 additions & 2 deletions ports/rocksdb/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ include(vcpkg_common_functions)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO facebook/rocksdb
REF v6.0.2
SHA512 6659f04c9823750b9b635e2a247b59dbda4975458615392df82bdbeb4ac7ac783e6de86a32fcc318aae1bb27880557390c544c99caa3db3885f9c3d836cc1df8
REF v6.1.2
SHA512 3d9e994b202c9f1c1c188e37a4f781bb97af5ba72f2f3f59091b79f402b819c9765dcd1e7d0851b5119c0bf510aa3f5bed44a542798ee81795a8328d71554b38
HEAD_REF master
PATCHES
0001-disable-gtest.patch
Expand All @@ -18,6 +18,7 @@ file(REMOVE "${SOURCE_PATH}/cmake/modules/Findzlib.cmake")
file(COPY
"${CMAKE_CURRENT_LIST_DIR}/Findlz4.cmake"
"${CMAKE_CURRENT_LIST_DIR}/Findsnappy.cmake"
"${CMAKE_CURRENT_LIST_DIR}/Findzstd.cmake"
DESTINATION "${SOURCE_PATH}/cmake/modules"
)

Expand All @@ -40,6 +41,11 @@ if("zlib" IN_LIST FEATURES)
set(WITH_ZLIB ON)
endif()

set(WITH_ZLIB OFF)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be WITH_ZSTD?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, of course 🤦‍♂

if("zstd" IN_LIST FEATURES)
set(WITH_ZLIB ON)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Likewise.

endif()

set(WITH_TBB OFF)
set(ROCKSDB_IGNORE_PACKAGE_TBB TRUE)
if("tbb" IN_LIST FEATURES)
Expand All @@ -57,6 +63,7 @@ vcpkg_configure_cmake(
-DWITH_LZ4=${WITH_LZ4}
-DWITH_ZLIB=${WITH_ZLIB}
-DWITH_TBB=${WITH_TBB}
-DWITH_ZSTD=${WITH_ZSTD}
-DWITH_TESTS=OFF
-DUSE_RTTI=1
-DROCKSDB_INSTALL_ON_WINDOWS=ON
Expand Down