-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Matt <mtbarta@gmail.com>
- Loading branch information
Showing
14 changed files
with
316 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
[bumpversion] | ||
current_version = 0.3.1 | ||
current_version = 0.4.0 | ||
commit = True | ||
tag = True | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,17 @@ | ||
python: | ||
- 3.9 | ||
- 3.10 | ||
# - 3.9 | ||
# - 3.10 | ||
- 3.11 | ||
- 3.12 | ||
# - 3.12 | ||
MACOSX_SDK_VERSION: # [osx and x86_64] | ||
- "10.13" # [osx and x86_64] | ||
MACOSX_DEPLOYMENT_TARGET: # [osx and x86_64] | ||
- "10.13" # [osx and x86_64] | ||
c_compiler: | ||
- clang | ||
c_compiler_version: | ||
- 18 | ||
cxx_compiler: | ||
- clangxx | ||
cxx_compiler_version: | ||
- 18 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#pragma once | ||
|
||
#define LINTDB_VERSION_STRING "0.3.1" | ||
#define LINTDB_VERSION_STRING "0.4.0" | ||
|
||
|
||
namespace lintdb { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,122 @@ | ||
CMakeLists.txt | 33 +++++++++++++++------------------ | ||
cmake/RocksDBConfig.cmake.in | 11 ++++++++--- | ||
2 files changed, 23 insertions(+), 21 deletions(-) | ||
|
||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index 23a4014bc..045f5a36d 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -87,7 +87,7 @@ endif() | ||
|
||
include(CMakeDependentOption) | ||
|
||
-if(MSVC) | ||
+if(0) | ||
option(WITH_GFLAGS "build with GFlags" OFF) | ||
option(WITH_XPRESS "build with windows built in compression" OFF) | ||
option(ROCKSDB_SKIP_THIRDPARTY "skip thirdparty.inc" OFF) | ||
@@ -136,10 +136,7 @@ else() | ||
endif() | ||
|
||
if(WITH_SNAPPY) | ||
- find_package(Snappy CONFIG) | ||
- if(NOT Snappy_FOUND) | ||
- find_package(Snappy REQUIRED) | ||
- endif() | ||
+ find_package(Snappy CONFIG REQUIRED) | ||
add_definitions(-DSNAPPY) | ||
list(APPEND THIRDPARTY_LIBS Snappy::snappy) | ||
endif() | ||
@@ -163,16 +160,19 @@ else() | ||
endif() | ||
|
||
if(WITH_LZ4) | ||
- find_package(lz4 REQUIRED) | ||
+ find_package(lz4 CONFIG REQUIRED) | ||
add_definitions(-DLZ4) | ||
list(APPEND THIRDPARTY_LIBS lz4::lz4) | ||
endif() | ||
|
||
if(WITH_ZSTD) | ||
- find_package(zstd REQUIRED) | ||
+ find_package(zstd CONFIG REQUIRED) | ||
add_definitions(-DZSTD) | ||
- include_directories(${ZSTD_INCLUDE_DIR}) | ||
- list(APPEND THIRDPARTY_LIBS zstd::zstd) | ||
+ if(TARGET zstd::libzstd_shared) | ||
+ list(APPEND THIRDPARTY_LIBS zstd::libzstd_shared) | ||
+ elseif(TARGET zstd::libzstd_static) | ||
+ list(APPEND THIRDPARTY_LIBS zstd::libzstd_static) | ||
+ endif() | ||
endif() | ||
endif() | ||
|
||
@@ -312,11 +312,10 @@ int main() { | ||
endif() | ||
|
||
if (WITH_LIBURING) | ||
- find_package(uring) | ||
- if (uring_FOUND) | ||
- add_definitions(-DROCKSDB_IOURING_PRESENT) | ||
- list(APPEND THIRDPARTY_LIBS uring::uring) | ||
- endif() | ||
+ find_package(PkgConfig) | ||
+ pkg_check_modules(liburing REQUIRED IMPORTED_TARGET GLOBAL liburing>=2.0) | ||
+ add_definitions(-DROCKSDB_IOURING_PRESENT) | ||
+ list(APPEND THIRDPARTY_LIBS PkgConfig::liburing) | ||
endif() | ||
|
||
# Reset the required flags | ||
@@ -382,9 +381,9 @@ endif() | ||
|
||
option(WITH_TBB "build with Threading Building Blocks (TBB)" OFF) | ||
if(WITH_TBB) | ||
- find_package(TBB REQUIRED) | ||
+ find_package(TBB CONFIG REQUIRED) | ||
add_definitions(-DTBB) | ||
- list(APPEND THIRDPARTY_LIBS TBB::TBB) | ||
+ list(APPEND THIRDPARTY_LIBS TBB::tbb) | ||
endif() | ||
|
||
# Stall notifications eat some performance from inserts | ||
@@ -1202,8 +1201,6 @@ if(NOT WIN32 OR ROCKSDB_INSTALL_ON_WINDOWS) | ||
endforeach() | ||
endforeach() | ||
|
||
- install(DIRECTORY "${PROJECT_SOURCE_DIR}/cmake/modules" COMPONENT devel DESTINATION ${package_config_destination}) | ||
- | ||
install( | ||
TARGETS ${ROCKSDB_STATIC_LIB} | ||
EXPORT RocksDBTargets | ||
diff --git a/cmake/RocksDBConfig.cmake.in b/cmake/RocksDBConfig.cmake.in | ||
index 0bd14be11..a420d8bfe 100644 | ||
--- a/cmake/RocksDBConfig.cmake.in | ||
+++ b/cmake/RocksDBConfig.cmake.in | ||
@@ -33,11 +33,11 @@ if(@WITH_BZ2@) | ||
endif() | ||
|
||
if(@WITH_LZ4@) | ||
- find_dependency(lz4) | ||
+ find_dependency(lz4 CONFIG) | ||
endif() | ||
|
||
if(@WITH_ZSTD@) | ||
- find_dependency(zstd) | ||
+ find_dependency(zstd CONFIG) | ||
endif() | ||
|
||
if(@WITH_NUMA@) | ||
@@ -45,7 +45,12 @@ if(@WITH_NUMA@) | ||
endif() | ||
|
||
if(@WITH_TBB@) | ||
- find_dependency(TBB) | ||
+ find_dependency(TBB CONFIG) | ||
+endif() | ||
+ | ||
+if(@WITH_LIBURING@) | ||
+ find_dependency(PkgConfig) | ||
+ pkg_check_modules(liburing REQUIRED IMPORTED_TARGET GLOBAL liburing>=2.0) | ||
endif() | ||
|
||
find_dependency(Threads) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
vcpkg_from_github( | ||
OUT_SOURCE_PATH SOURCE_PATH | ||
REPO facebook/rocksdb | ||
REF "v${VERSION}" | ||
SHA512 524e3e70ed2b1d2e6c61a7b401946e50473cc95684ce4efc6250062f5bc945e443e96f7907fcc3ee1ab98c71179a8b56a654383cf2c0bbe1bb20907ab1ac7523 | ||
HEAD_REF main | ||
PATCHES | ||
0001-fix-dependencies.patch | ||
) | ||
|
||
string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "dynamic" WITH_MD_LIBRARY) | ||
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" ROCKSDB_BUILD_SHARED) | ||
|
||
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS | ||
FEATURES | ||
"liburing" WITH_LIBURING | ||
"snappy" WITH_SNAPPY | ||
"lz4" WITH_LZ4 | ||
"zlib" WITH_ZLIB | ||
"zstd" WITH_ZSTD | ||
"bzip2" WITH_BZ2 | ||
"numa" WITH_NUMA | ||
"tbb" WITH_TBB | ||
) | ||
|
||
vcpkg_cmake_configure( | ||
SOURCE_PATH "${SOURCE_PATH}" | ||
OPTIONS | ||
-DWITH_GFLAGS=OFF | ||
-DWITH_TESTS=OFF | ||
-DWITH_BENCHMARK_TOOLS=OFF | ||
-DWITH_TOOLS=OFF | ||
-DUSE_RTTI=ON | ||
-DROCKSDB_INSTALL_ON_WINDOWS=ON | ||
-DFAIL_ON_WARNINGS=OFF | ||
-DWITH_MD_LIBRARY=${WITH_MD_LIBRARY} | ||
-DPORTABLE=1 # Minimum CPU arch to support, or 0 = current CPU, 1 = baseline CPU | ||
-DROCKSDB_BUILD_SHARED=${ROCKSDB_BUILD_SHARED} | ||
-DCMAKE_DISABLE_FIND_PACKAGE_Git=TRUE | ||
${FEATURE_OPTIONS} | ||
OPTIONS_DEBUG | ||
-DCMAKE_DEBUG_POSTFIX=d | ||
-DWITH_RUNTIME_DEBUG=ON | ||
OPTIONS_RELEASE | ||
-DWITH_RUNTIME_DEBUG=OFF | ||
) | ||
|
||
vcpkg_cmake_install() | ||
|
||
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/rocksdb) | ||
|
||
vcpkg_copy_pdbs() | ||
|
||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") | ||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") | ||
|
||
vcpkg_fixup_pkgconfig() | ||
|
||
vcpkg_install_copyright(COMMENT [[ | ||
RocksDB is dual-licensed under both the GPLv2 (found in COPYING) | ||
and Apache 2.0 License (found in LICENSE.Apache). You may select, | ||
at your option, one of the above-listed licenses. | ||
]] | ||
FILE_LIST | ||
"${SOURCE_PATH}/LICENSE.leveldb" | ||
"${SOURCE_PATH}/LICENSE.Apache" | ||
"${SOURCE_PATH}/COPYING" | ||
) |
Oops, something went wrong.