mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-14 14:37:55 +08:00
[rocksdb] update to v5.15.10 (#4342)
* [rocksdb] Update to v5.15.10 * [rocksdb] Cleanup * [rocksdb] Fix cmake targets name. * [toolchains] Set NDEBUG in release * [rocksdb] Disable vcpkg_test_cmake due to misbehavior in x64 * [tiff] Use lzma on linux
This commit is contained in:
parent
cc3fae8e5c
commit
91ba6e4631
13
ports/rocksdb/0001-disable-gtest.patch
Normal file
13
ports/rocksdb/0001-disable-gtest.patch
Normal file
@ -0,0 +1,13 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 5b7d37359..9ab8954b6 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -445,7 +445,7 @@ include_directories(${PROJECT_SOURCE_DIR}/include)
|
||||
include_directories(SYSTEM ${PROJECT_SOURCE_DIR}/third-party/gtest-1.7.0/fused-src)
|
||||
find_package(Threads REQUIRED)
|
||||
|
||||
-add_subdirectory(third-party/gtest-1.7.0/fused-src/gtest)
|
||||
+#add_subdirectory(third-party/gtest-1.7.0/fused-src/gtest)
|
||||
|
||||
# Main library source code
|
||||
|
@ -1,25 +0,0 @@
|
||||
From f1ecf23b8a10ab5a917da4a39fba343a00cab1a9 Mon Sep 17 00:00:00 2001
|
||||
From: Robert Schumacher <roschuma@microsoft.com>
|
||||
Date: Fri, 23 Feb 2018 01:44:57 -0800
|
||||
Subject: [PATCH 2/3] disable gtest
|
||||
|
||||
---
|
||||
CMakeLists.txt | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 5fb551a..faffc91 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -393,7 +393,7 @@ include_directories(${PROJECT_SOURCE_DIR}/include)
|
||||
include_directories(SYSTEM ${PROJECT_SOURCE_DIR}/third-party/gtest-1.7.0/fused-src)
|
||||
find_package(Threads REQUIRED)
|
||||
|
||||
-add_subdirectory(third-party/gtest-1.7.0/fused-src/gtest)
|
||||
+#add_subdirectory(third-party/gtest-1.7.0/fused-src/gtest)
|
||||
|
||||
# Main library source code
|
||||
|
||||
--
|
||||
2.16.2.windows.1
|
||||
|
@ -1,17 +1,8 @@
|
||||
From f77366e2bf8c136990b89ab235af8e0cf0e566f4 Mon Sep 17 00:00:00 2001
|
||||
From: Robert Schumacher <roschuma@microsoft.com>
|
||||
Date: Fri, 23 Feb 2018 01:45:18 -0800
|
||||
Subject: [PATCH 3/3] only build one flavor
|
||||
|
||||
---
|
||||
CMakeLists.txt | 9 +++++++++
|
||||
1 file changed, 9 insertions(+)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index faffc91..89dc537 100644
|
||||
index 9ab8954b6..5b0405f4a 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -723,6 +723,7 @@ if(NOT WIN32 OR ROCKSDB_INSTALL_ON_WINDOWS)
|
||||
@@ -793,6 +793,7 @@ if(NOT WIN32 OR ROCKSDB_INSTALL_ON_WINDOWS)
|
||||
|
||||
install(DIRECTORY include/rocksdb COMPONENT devel DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
|
||||
|
||||
@ -19,7 +10,7 @@ index faffc91..89dc537 100644
|
||||
install(
|
||||
TARGETS ${ROCKSDB_STATIC_LIB}
|
||||
EXPORT RocksDBTargets
|
||||
@@ -730,15 +731,23 @@ if(NOT WIN32 OR ROCKSDB_INSTALL_ON_WINDOWS)
|
||||
@@ -800,15 +801,23 @@ if(NOT WIN32 OR ROCKSDB_INSTALL_ON_WINDOWS)
|
||||
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
||||
INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"
|
||||
)
|
||||
@ -43,6 +34,3 @@ index faffc91..89dc537 100644
|
||||
|
||||
install(
|
||||
EXPORT RocksDBTargets
|
||||
--
|
||||
2.16.2.windows.1
|
||||
|
@ -1,8 +1,8 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index fb3b126..45ca7b6 100644
|
||||
index 5b0405f4a..43256fc04 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -86,7 +86,7 @@ else()
|
||||
@@ -88,7 +88,7 @@ else()
|
||||
endif()
|
||||
|
||||
if(WITH_ZLIB)
|
@ -1,13 +1,13 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index f3ac9ce..931e9f2 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -45,7 +45,7 @@ option(WITH_JEMALLOC "build with JeMalloc" OFF)
|
||||
option(WITH_SNAPPY "build with SNAPPY" OFF)
|
||||
option(WITH_LZ4 "build with lz4" OFF)
|
||||
option(WITH_ZLIB "build with zlib" OFF)
|
||||
-if(MSVC)
|
||||
+if(MSVC AND NOT VCPKG_TOOLCHAIN)
|
||||
# Defaults currently different for GFLAGS.
|
||||
# We will address find_package work a little later
|
||||
option(WITH_GFLAGS "build with GFlags" OFF)
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 43256fc04..204761256 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -49,7 +49,7 @@ option(WITH_SNAPPY "build with SNAPPY" OFF)
|
||||
option(WITH_LZ4 "build with lz4" OFF)
|
||||
option(WITH_ZLIB "build with zlib" OFF)
|
||||
option(WITH_ZSTD "build with zstd" OFF)
|
||||
-if(MSVC)
|
||||
+if(MSVC AND NOT VCPKG_TOOLCHAIN)
|
||||
# Defaults currently different for GFLAGS.
|
||||
# We will address find_package work a little later
|
||||
option(WITH_GFLAGS "build with GFlags" OFF)
|
@ -1,5 +1,5 @@
|
||||
Source: rocksdb
|
||||
Version: 5.14.2
|
||||
Version: 5.15.10
|
||||
Description: A library that provides an embeddable, persistent key-value store for fast storage
|
||||
Default-Features: zlib
|
||||
|
||||
|
@ -1,20 +0,0 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index d6bfbf2..ea6a884 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -132,6 +132,7 @@ endif()
|
||||
|
||||
string(REGEX REPLACE "[^0-9a-f]+" "" GIT_SHA "${GIT_SHA}")
|
||||
|
||||
+if(NOT DEFINED ROCKSDB_VERSION OR NOT DEFINED ROCKSDB_VERSION_MAJOR)
|
||||
set(SH_CMD "sh")
|
||||
execute_process(COMMAND
|
||||
${SH_CMD} -c "build_tools/version.sh full"
|
||||
@@ -145,6 +146,7 @@ execute_process(COMMAND
|
||||
OUTPUT_VARIABLE ROCKSDB_VERSION_MAJOR
|
||||
)
|
||||
string(STRIP "${ROCKSDB_VERSION_MAJOR}" ROCKSDB_VERSION_MAJOR)
|
||||
+endif()
|
||||
|
||||
option(WITH_MD_LIBRARY "build with MD" ON)
|
||||
if(WIN32 AND MSVC)
|
@ -3,19 +3,14 @@ include(vcpkg_common_functions)
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO facebook/rocksdb
|
||||
REF v5.14.2
|
||||
SHA512 44ea887157daa1b504205d73ec07ff2c74164973aa057e58a02f39e0540dc394af8218da8bda57152c2a3171262e7147a5dbc4b6dd2c25eb35388d0786de0e35
|
||||
REF v5.15.10
|
||||
SHA512 3faef43cc343c20e044f92af7cd9eae9783612d888bfe17b7d0ae6812090088f43a128e5686600ec56f5a88c100eaa893b2551f8c32df793a4ccd94330c07037
|
||||
HEAD_REF master
|
||||
)
|
||||
|
||||
vcpkg_apply_patches(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PATCHES
|
||||
"${CMAKE_CURRENT_LIST_DIR}/0002-disable-gtest.patch"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/0003-only-build-one-flavor.patch"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/0004-zlib-findpackage.patch"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/use-find-package.patch"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/pass-major-version.patch"
|
||||
0001-disable-gtest.patch
|
||||
0002-only-build-one-flavor.patch
|
||||
0003-zlib-findpackage.patch
|
||||
0004-use-find-package.patch
|
||||
)
|
||||
|
||||
file(REMOVE "${SOURCE_PATH}/cmake/modules/Findzlib.cmake")
|
||||
@ -25,12 +20,7 @@ file(COPY
|
||||
DESTINATION "${SOURCE_PATH}/cmake/modules"
|
||||
)
|
||||
|
||||
if(VCPKG_CRT_LINKAGE STREQUAL "static")
|
||||
set(WITH_MD_LIBRARY OFF)
|
||||
else()
|
||||
set(WITH_MD_LIBRARY ON)
|
||||
endif()
|
||||
|
||||
string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "dynamic" WITH_MD_LIBRARY)
|
||||
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" ROCKSDB_DISABLE_INSTALL_SHARED_LIB)
|
||||
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" ROCKSDB_DISABLE_INSTALL_STATIC_LIB)
|
||||
|
||||
@ -49,10 +39,6 @@ if("zlib" IN_LIST FEATURES)
|
||||
set(WITH_ZLIB ON)
|
||||
endif()
|
||||
|
||||
get_filename_component(ROCKSDB_VERSION "${SOURCE_PATH}" NAME)
|
||||
string(REPLACE "rocksdb-" "" ROCKSDB_VERSION "${ROCKSDB_VERSION}")
|
||||
string(REGEX REPLACE "^([0-9]+)." "\\1" ROCKSDB_MAJOR_VERSION "${ROCKSDB_VERSION}")
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
@ -69,8 +55,6 @@ vcpkg_configure_cmake(
|
||||
-DCMAKE_DEBUG_POSTFIX=d
|
||||
-DROCKSDB_DISABLE_INSTALL_SHARED_LIB=${ROCKSDB_DISABLE_INSTALL_SHARED_LIB}
|
||||
-DROCKSDB_DISABLE_INSTALL_STATIC_LIB=${ROCKSDB_DISABLE_INSTALL_STATIC_LIB}
|
||||
-DROCKSDB_VERSION=${ROCKSDB_VERSION}
|
||||
-DROCKSDB_VERSION_MAJOR=${ROCKSDB_MAJOR_VERSION}
|
||||
-DCMAKE_DISABLE_FIND_PACKAGE_TBB=TRUE
|
||||
-DCMAKE_DISABLE_FIND_PACKAGE_NUMA=TRUE
|
||||
-DCMAKE_DISABLE_FIND_PACKAGE_gtest=TRUE
|
||||
@ -84,6 +68,6 @@ vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/rocksdb)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE.Apache DESTINATION ${CURRENT_PACKAGES_DIR}/share/rocksdb RENAME copyright)
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE.leveldb DESTINATION ${CURRENT_PACKAGES_DIR}/share/rocksdb)
|
||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake ${SOURCE_PATH}/LICENSE.leveldb DESTINATION ${CURRENT_PACKAGES_DIR}/share/rocksdb)
|
||||
|
||||
vcpkg_copy_pdbs()
|
||||
|
9
ports/rocksdb/vcpkg-cmake-wrapper.cmake
Normal file
9
ports/rocksdb/vcpkg-cmake-wrapper.cmake
Normal file
@ -0,0 +1,9 @@
|
||||
_find_package(${ARGS})
|
||||
if(NOT TARGET RocksDB::rocksdb AND TARGET RocksDB::rocksdb-shared)
|
||||
add_library(RocksDB::rocksdb INTERFACE IMPORTED)
|
||||
set_target_properties(RocksDB::rocksdb PROPERTIES INTERFACE_LINK_LIBRARIES "RocksDB::rocksdb-shared")
|
||||
endif()
|
||||
if(TARGET RocksDB::rocksdb AND NOT TARGET RocksDB::rocksdb-shared)
|
||||
add_library(RocksDB::rocksdb-shared INTERFACE IMPORTED)
|
||||
set_target_properties(RocksDB::rocksdb-shared PROPERTIES INTERFACE_LINK_LIBRARIES "RocksDB::rocksdb")
|
||||
endif()
|
@ -5,14 +5,14 @@ set(CMAKE_SYSTEM_NAME FreeBSD CACHE STRING "")
|
||||
|
||||
get_property( _CMAKE_IN_TRY_COMPILE GLOBAL PROPERTY IN_TRY_COMPILE )
|
||||
if(NOT _CMAKE_IN_TRY_COMPILE)
|
||||
set(CMAKE_CXX_FLAGS "${VCPKG_CXX_FLAGS} -fPIC" CACHE STRING "")
|
||||
set(CMAKE_C_FLAGS "${VCPKG_C_FLAGS} -fPIC" CACHE STRING "")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${VCPKG_CXX_FLAGS} -fPIC" CACHE STRING "")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${VCPKG_C_FLAGS} -fPIC" CACHE STRING "")
|
||||
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${VCPKG_CXX_FLAGS_DEBUG}" CACHE STRING "")
|
||||
set(CMAKE_C_FLAGS_DEBUG "${VCPKG_C_FLAGS_DEBUG}" CACHE STRING "")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "${VCPKG_CXX_FLAGS_RELEASE}" CACHE STRING "")
|
||||
set(CMAKE_C_FLAGS_RELEASE "${VCPKG_C_FLAGS_RELEASE}" CACHE STRING "")
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${VCPKG_CXX_FLAGS_DEBUG}" CACHE STRING "")
|
||||
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} ${VCPKG_C_FLAGS_DEBUG}" CACHE STRING "")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${VCPKG_CXX_FLAGS_RELEASE}" CACHE STRING "")
|
||||
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} ${VCPKG_C_FLAGS_RELEASE}" CACHE STRING "")
|
||||
|
||||
set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${VCPKG_LINKER_FLAGS}" CACHE STRING "")
|
||||
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${VCPKG_LINKER_FLAGS}" CACHE STRING "")
|
||||
set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} ${VCPKG_LINKER_FLAGS}" CACHE STRING "")
|
||||
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} ${VCPKG_LINKER_FLAGS}" CACHE STRING "")
|
||||
endif()
|
||||
|
@ -5,14 +5,14 @@ set(CMAKE_SYSTEM_NAME Linux CACHE STRING "")
|
||||
|
||||
get_property( _CMAKE_IN_TRY_COMPILE GLOBAL PROPERTY IN_TRY_COMPILE )
|
||||
if(NOT _CMAKE_IN_TRY_COMPILE)
|
||||
set(CMAKE_CXX_FLAGS "${VCPKG_CXX_FLAGS} -fPIC" CACHE STRING "")
|
||||
set(CMAKE_C_FLAGS "${VCPKG_C_FLAGS} -fPIC" CACHE STRING "")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${VCPKG_CXX_FLAGS} -fPIC" CACHE STRING "")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${VCPKG_C_FLAGS} -fPIC" CACHE STRING "")
|
||||
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${VCPKG_CXX_FLAGS_DEBUG}" CACHE STRING "")
|
||||
set(CMAKE_C_FLAGS_DEBUG "${VCPKG_C_FLAGS_DEBUG}" CACHE STRING "")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "${VCPKG_CXX_FLAGS_RELEASE}" CACHE STRING "")
|
||||
set(CMAKE_C_FLAGS_RELEASE "${VCPKG_C_FLAGS_RELEASE}" CACHE STRING "")
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${VCPKG_CXX_FLAGS_DEBUG}" CACHE STRING "")
|
||||
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} ${VCPKG_C_FLAGS_DEBUG}" CACHE STRING "")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${VCPKG_CXX_FLAGS_RELEASE}" CACHE STRING "")
|
||||
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} ${VCPKG_C_FLAGS_RELEASE}" CACHE STRING "")
|
||||
|
||||
set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${VCPKG_LINKER_FLAGS}" CACHE STRING "")
|
||||
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${VCPKG_LINKER_FLAGS}" CACHE STRING "")
|
||||
set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} ${VCPKG_LINKER_FLAGS}" CACHE STRING "")
|
||||
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} ${VCPKG_LINKER_FLAGS}" CACHE STRING "")
|
||||
endif()
|
||||
|
@ -13,14 +13,14 @@ set(CMAKE_MACOSX_RPATH ON CACHE BOOL "")
|
||||
|
||||
get_property( _CMAKE_IN_TRY_COMPILE GLOBAL PROPERTY IN_TRY_COMPILE )
|
||||
if(NOT _CMAKE_IN_TRY_COMPILE)
|
||||
set(CMAKE_CXX_FLAGS "${VCPKG_CXX_FLAGS} -fPIC" CACHE STRING "")
|
||||
set(CMAKE_C_FLAGS "${VCPKG_C_FLAGS} -fPIC" CACHE STRING "")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${VCPKG_CXX_FLAGS} -fPIC" CACHE STRING "")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${VCPKG_C_FLAGS} -fPIC" CACHE STRING "")
|
||||
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${VCPKG_CXX_FLAGS_DEBUG}" CACHE STRING "")
|
||||
set(CMAKE_C_FLAGS_DEBUG "${VCPKG_C_FLAGS_DEBUG}" CACHE STRING "")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "${VCPKG_CXX_FLAGS_RELEASE}" CACHE STRING "")
|
||||
set(CMAKE_C_FLAGS_RELEASE "${VCPKG_C_FLAGS_RELEASE}" CACHE STRING "")
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${VCPKG_CXX_FLAGS_DEBUG}" CACHE STRING "")
|
||||
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} ${VCPKG_C_FLAGS_DEBUG}" CACHE STRING "")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${VCPKG_CXX_FLAGS_RELEASE}" CACHE STRING "")
|
||||
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} ${VCPKG_C_FLAGS_RELEASE}" CACHE STRING "")
|
||||
|
||||
set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${VCPKG_LINKER_FLAGS}" CACHE STRING "")
|
||||
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${VCPKG_LINKER_FLAGS}" CACHE STRING "")
|
||||
set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} ${VCPKG_LINKER_FLAGS}" CACHE STRING "")
|
||||
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} ${VCPKG_LINKER_FLAGS}" CACHE STRING "")
|
||||
endif()
|
||||
|
Loading…
x
Reference in New Issue
Block a user