-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'facebookincubator:main' into gayangya/update_azuresdk
- Loading branch information
Showing
420 changed files
with
16,632 additions
and
5,487 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
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,34 @@ | ||
# Copyright (c) Facebook, Inc. and its affiliates. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
include_guard(GLOBAL) | ||
|
||
set(VELOX_CPR_VERSION 1.10.5) | ||
set(VELOX_CPR_BUILD_SHA256_CHECKSUM | ||
c8590568996cea918d7cf7ec6845d954b9b95ab2c4980b365f582a665dea08d8) | ||
set(VELOX_CPR_SOURCE_URL | ||
"https://github.com/libcpr/cpr/archive/refs/tags/${VELOX_CPR_VERSION}.tar.gz" | ||
) | ||
|
||
resolve_dependency_url(CPR) | ||
|
||
message(STATUS "Building cpr from source") | ||
FetchContent_Declare( | ||
cpr | ||
URL ${VELOX_CPR_SOURCE_URL} | ||
URL_HASH ${VELOX_CPR_BUILD_SHA256_CHECKSUM} | ||
PATCH_COMMAND git apply | ||
${CMAKE_CURRENT_LIST_DIR}/cpr/cpr-libcurl-compatible.patch) | ||
set(BUILD_SHARED_LIBS OFF) | ||
set(CPR_USE_SYSTEM_CURL ON) | ||
FetchContent_MakeAvailable(cpr) |
41 changes: 41 additions & 0 deletions
41
CMake/resolve_dependency_modules/cpr/cpr-libcurl-compatible.patch
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,41 @@ | ||
# Copyright (c) Facebook, Inc. and its affiliates. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
# This can be removed once we upgrade to curl >= 7.68.0 | ||
--- a/cpr/multiperform.cpp | ||
+++ b/cpr/multiperform.cpp | ||
@@ -97,9 +97,9 @@ void MultiPerform::DoMultiPerform() { | ||
|
||
if (still_running) { | ||
const int timeout_ms{250}; | ||
- error_code = curl_multi_poll(multicurl_->handle, nullptr, 0, timeout_ms, nullptr); | ||
+ error_code = curl_multi_wait(multicurl_->handle, nullptr, 0, timeout_ms, nullptr); | ||
if (error_code) { | ||
- std::cerr << "curl_multi_poll() failed, code " << static_cast<int>(error_code) << std::endl; | ||
+ std::cerr << "curl_multi_wait() failed, code " << static_cast<int>(error_code) << std::endl; | ||
break; | ||
} | ||
} | ||
|
||
--- a/include/cpr/util.h | ||
+++ b/include/cpr/util.h | ||
@@ -23,7 +23,7 @@ size_t writeUserFunction(char* ptr, size_t size, size_t nmemb, const WriteCallba | ||
template <typename T = ProgressCallback> | ||
int progressUserFunction(const T* progress, cpr_pf_arg_t dltotal, cpr_pf_arg_t dlnow, cpr_pf_arg_t ultotal, cpr_pf_arg_t ulnow) { | ||
const int cancel_retval{1}; | ||
- static_assert(cancel_retval != CURL_PROGRESSFUNC_CONTINUE); | ||
+ static_assert(cancel_retval != 0x10000001); | ||
return (*progress)(dltotal, dlnow, ultotal, ulnow) ? 0 : cancel_retval; | ||
} | ||
int debugUserFunction(CURL* handle, curl_infotype type, char* data, size_t size, const DebugCallback* debug); |
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 +1 @@ | ||
Subproject commit f949ffbabaf9d8129174e70b0a019f84ac5900fd | ||
Subproject commit 2fbd5cf24d61ed589304bd5af4ac3b19583cdd56 |
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,19 @@ | ||
# Copyright (c) Meta Platforms, Inc. and affiliates. | ||
# | ||
# This software may be used and distributed according to the terms of the | ||
# GNU General Public License version 2. | ||
|
||
find_library(LMDB_LIBRARIES NAMES lmdb liblmdb) | ||
mark_as_advanced(LMDB_LIBRARIES) | ||
|
||
find_path(LMDB_INCLUDE_DIR NAMES lmdb.h) | ||
mark_as_advanced(LMDB_INCLUDE_DIR) | ||
|
||
find_package_handle_standard_args( | ||
LMDB | ||
REQUIRED_VARS LMDB_LIBRARIES LMDB_INCLUDE_DIR) | ||
|
||
if(LMDB_FOUND) | ||
set(LMDB_LIBRARIES ${LMDB_LIBRARIES}) | ||
set(LMDB_INCLUDE_DIR, ${LMDB_INCLUDE_DIR}) | ||
endif() |
Oops, something went wrong.