[folly] Add feature liburing (#29684)

* [folly] Add feature liburing

* update version

* update version

* Modify the description of feature

* update version
This commit is contained in:
Lily Wang 2023-02-21 09:41:58 -08:00 committed by GitHub
parent ad415d3500
commit 5ea703d315
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 34 additions and 10 deletions

View File

@ -1,8 +1,8 @@
diff --git a/CMake/folly-config.cmake.in b/CMake/folly-config.cmake.in diff --git a/CMake/folly-config.cmake.in b/CMake/folly-config.cmake.in
index 1689f9a..801d562 100644 index 1689f9a..e5d3e22 100644
--- a/CMake/folly-config.cmake.in --- a/CMake/folly-config.cmake.in
+++ b/CMake/folly-config.cmake.in +++ b/CMake/folly-config.cmake.in
@@ -28,10 +28,30 @@ endif() @@ -28,10 +28,35 @@ endif()
set(FOLLY_LIBRARIES Folly::folly) set(FOLLY_LIBRARIES Folly::folly)
# Find folly's dependencies # Find folly's dependencies
@ -27,6 +27,11 @@ index 1689f9a..801d562 100644
+if (NOT @CMAKE_DISABLE_FIND_PACKAGE_LZ4@) +if (NOT @CMAKE_DISABLE_FIND_PACKAGE_LZ4@)
+ find_dependency(lz4 CONFIG) + find_dependency(lz4 CONFIG)
+endif() +endif()
+
+if (@WITH_liburing@)
+ find_dependency(LibUring)
+endif()
+
+find_dependency(fmt CONFIG) +find_dependency(fmt CONFIG)
set(Boost_USE_STATIC_LIBS "@FOLLY_BOOST_LINK_STATIC@") set(Boost_USE_STATIC_LIBS "@FOLLY_BOOST_LINK_STATIC@")
@ -36,7 +41,7 @@ index 1689f9a..801d562 100644
context context
filesystem filesystem
diff --git a/CMake/folly-deps.cmake b/CMake/folly-deps.cmake diff --git a/CMake/folly-deps.cmake b/CMake/folly-deps.cmake
index 4b78e9f..d4c224e 100644 index 4b78e9f..ac83c99 100644
--- a/CMake/folly-deps.cmake --- a/CMake/folly-deps.cmake
+++ b/CMake/folly-deps.cmake +++ b/CMake/folly-deps.cmake
@@ -35,7 +35,7 @@ else() @@ -35,7 +35,7 @@ else()
@ -156,9 +161,15 @@ index 4b78e9f..d4c224e 100644
endif() endif()
find_package(LibDwarf) find_package(LibDwarf)
@@ -141,9 +146,12 @@ find_package(LibUring) @@ -137,13 +142,18 @@ find_package(LibAIO)
list(APPEND FOLLY_LINK_LIBRARIES ${LIBAIO_LIBRARIES})
list(APPEND FOLLY_INCLUDE_DIRECTORIES ${LIBAIO_INCLUDE_DIRS})
+if(WITH_liburing)
find_package(LibUring)
list(APPEND FOLLY_LINK_LIBRARIES ${LIBURING_LIBRARIES}) list(APPEND FOLLY_LINK_LIBRARIES ${LIBURING_LIBRARIES})
list(APPEND FOLLY_INCLUDE_DIRECTORIES ${LIBURING_INCLUDE_DIRS}) list(APPEND FOLLY_INCLUDE_DIRECTORIES ${LIBURING_INCLUDE_DIRS})
+endif()
-find_package(Libsodium) -find_package(Libsodium)
-list(APPEND FOLLY_LINK_LIBRARIES ${LIBSODIUM_LIBRARIES}) -list(APPEND FOLLY_LINK_LIBRARIES ${LIBSODIUM_LIBRARIES})
@ -172,7 +183,7 @@ index 4b78e9f..d4c224e 100644
list(APPEND FOLLY_LINK_LIBRARIES ${CMAKE_DL_LIBS}) list(APPEND FOLLY_LINK_LIBRARIES ${CMAKE_DL_LIBS})
list(APPEND CMAKE_REQUIRED_LIBRARIES ${CMAKE_DL_LIBS}) list(APPEND CMAKE_REQUIRED_LIBRARIES ${CMAKE_DL_LIBS})
@@ -154,9 +162,9 @@ if (PYTHON_EXTENSIONS) @@ -154,9 +164,9 @@ if (PYTHON_EXTENSIONS)
endif () endif ()
find_package(LibUnwind) find_package(LibUnwind)
@ -184,7 +195,7 @@ index 4b78e9f..d4c224e 100644
set(FOLLY_HAVE_LIBUNWIND ON) set(FOLLY_HAVE_LIBUNWIND ON)
endif() endif()
if (CMAKE_SYSTEM_NAME MATCHES "FreeBSD") if (CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
@@ -299,11 +307,7 @@ endif() @@ -299,11 +309,7 @@ endif()
add_library(folly_deps INTERFACE) add_library(folly_deps INTERFACE)

View File

@ -41,6 +41,7 @@ endif()
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES FEATURES
"zlib" CMAKE_REQUIRE_FIND_PACKAGE_ZLIB "zlib" CMAKE_REQUIRE_FIND_PACKAGE_ZLIB
"liburing" WITH_liburing
INVERTED_FEATURES INVERTED_FEATURES
"bzip2" CMAKE_DISABLE_FIND_PACKAGE_BZip2 "bzip2" CMAKE_DISABLE_FIND_PACKAGE_BZip2
"lzma" CMAKE_DISABLE_FIND_PACKAGE_LibLZMA "lzma" CMAKE_DISABLE_FIND_PACKAGE_LibLZMA
@ -51,7 +52,7 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
) )
vcpkg_cmake_configure( vcpkg_cmake_configure(
SOURCE_PATH ${SOURCE_PATH} SOURCE_PATH "${SOURCE_PATH}"
OPTIONS OPTIONS
-DMSVC_USE_STATIC_RUNTIME=${MSVC_USE_STATIC_RUNTIME} -DMSVC_USE_STATIC_RUNTIME=${MSVC_USE_STATIC_RUNTIME}
-DCMAKE_DISABLE_FIND_PACKAGE_LibDwarf=ON -DCMAKE_DISABLE_FIND_PACKAGE_LibDwarf=ON
@ -62,6 +63,7 @@ vcpkg_cmake_configure(
${FEATURE_OPTIONS} ${FEATURE_OPTIONS}
MAYBE_UNUSED_VARIABLES MAYBE_UNUSED_VARIABLES
LIBAIO_FOUND LIBAIO_FOUND
MSVC_USE_STATIC_RUNTIME
) )
vcpkg_cmake_install(ADD_BIN_TO_PATH) vcpkg_cmake_install(ADD_BIN_TO_PATH)
@ -85,6 +87,6 @@ FILE(WRITE ${FOLLY_TARGETS_CMAKE} "${_contents}")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
# Handle copyright # Handle copyright
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
vcpkg_fixup_pkgconfig() vcpkg_fixup_pkgconfig()

View File

@ -1,7 +1,7 @@
{ {
"name": "folly", "name": "folly",
"version-string": "2022.10.31.00", "version-string": "2022.10.31.00",
"port-version": 3, "port-version": 4,
"description": "An open-source C++ library developed and used at Facebook. The library is UNSTABLE on Windows", "description": "An open-source C++ library developed and used at Facebook. The library is UNSTABLE on Windows",
"homepage": "https://github.com/facebook/folly", "homepage": "https://github.com/facebook/folly",
"license": "Apache-2.0", "license": "Apache-2.0",
@ -50,6 +50,12 @@
"libsodium" "libsodium"
] ]
}, },
"liburing": {
"description": "Support compile with liburing",
"dependencies": [
"liburing"
]
},
"lz4": { "lz4": {
"description": "Support lz4 for compression", "description": "Support lz4 for compression",
"dependencies": [ "dependencies": [

View File

@ -2490,7 +2490,7 @@
}, },
"folly": { "folly": {
"baseline": "2022.10.31.00", "baseline": "2022.10.31.00",
"port-version": 3 "port-version": 4
}, },
"font-chef": { "font-chef": {
"baseline": "1.1.0", "baseline": "1.1.0",

View File

@ -1,5 +1,10 @@
{ {
"versions": [ "versions": [
{
"git-tree": "9f031566a728d2a7adf76c1026324cfc993b02a6",
"version-string": "2022.10.31.00",
"port-version": 4
},
{ {
"git-tree": "134e8cf60a376c02580a13800bf83d345bf082f9", "git-tree": "134e8cf60a376c02580a13800bf83d345bf082f9",
"version-string": "2022.10.31.00", "version-string": "2022.10.31.00",