[flatbuffers] update to v22.10.26 (#27298)

This commit is contained in:
JonLiu1993 2022-11-18 14:47:35 +08:00 committed by GitHub
parent ca519c8e85
commit 04429e4938
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 14 additions and 53 deletions

View File

@ -1,8 +1,8 @@
diff --git a/src/util.cpp b/src/util.cpp
index 3670a019..fb5d884f 100644
index aabc23a..06e9ebe 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -255,9 +255,15 @@ bool ReadEnvironmentVariable(const char *var_name, std::string *_value) {
@@ -420,9 +420,15 @@ bool ReadEnvironmentVariable(const char *var_name, std::string *_value) {
#ifdef _MSC_VER
__pragma(warning(disable : 4996)); // _CRT_SECURE_NO_WARNINGS
#endif

View File

@ -1,13 +0,0 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ec782239..f163b64d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -216,7 +216,7 @@ set(FlatBuffers_GRPCTest_SRCS
# source_group(Compiler FILES ${FlatBuffers_Compiler_SRCS})
# source_group(Tests FILES ${FlatBuffers_Tests_SRCS})
-if(EXISTS "${CMAKE_TOOLCHAIN_FILE}")
+if(EXISTS "${CMAKE_TOOLCHAIN_FILE}" AND NOT DEFINED VCPKG_TOOLCHAIN)
# do not apply any global settings if the toolchain
# is being configured externally
message(STATUS "Using toolchain file: ${CMAKE_TOOLCHAIN_FILE}.")

View File

@ -1,23 +0,0 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ec782239..57566c5a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -233,13 +233,17 @@ elseif(CMAKE_COMPILER_IS_GNUCXX)
"${CMAKE_CXX_FLAGS} -std=c++0x")
endif(CYGWIN)
set(CMAKE_CXX_FLAGS
- "${CMAKE_CXX_FLAGS} -Wall -pedantic -Werror -Wextra -Werror=shadow")
+ "${CMAKE_CXX_FLAGS} -Wall -pedantic -Wextra -Werror=shadow")
set(FLATBUFFERS_PRIVATE_CXX_FLAGS "-Wold-style-cast")
if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.4)
if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 7.0)
set(CMAKE_CXX_FLAGS
"${CMAKE_CXX_FLAGS} -faligned-new -Werror=implicit-fallthrough=2")
endif()
+ if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.0)
+ set(CMAKE_CXX_FLAGS
+ "${CMAKE_CXX_FLAGS} -Wextra")
+ endif()
set(CMAKE_CXX_FLAGS
"${CMAKE_CXX_FLAGS} -Wunused-result -Werror=unused-result -Wunused-parameter -Werror=unused-parameter")
endif()

View File

@ -3,12 +3,10 @@ vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO google/flatbuffers
REF v2.0.6
SHA512 be631f34064c28d81876bf137c796e9736623cf2cc4f2a05dd45372e7195729c99fad1fa795f8ce71a408756a842edbdc0c3bc714a7cf63203a1de8681d86fb6
REF 203241ed3275625c8a25c4a1e7b86e3c0289c488 #v22.10.26
SHA512 b2c889aa97d039f0044133daea6c68361ab4d4bb80bd6c67d3e1f6ffd1b4175fc36a21b1ab3a75d83b0296c83d98f6e42756e01fc1193ba19a77c3e896cba212
HEAD_REF master
PATCHES
ignore_use_of_cmake_toolchain_file.patch
no-werror.patch
fix-uwp-build.patch
)
@ -31,20 +29,14 @@ vcpkg_fixup_pkgconfig()
file(GLOB flatc_path ${CURRENT_PACKAGES_DIR}/bin/flatc*)
if(flatc_path)
make_directory("${CURRENT_PACKAGES_DIR}/tools/flatbuffers")
get_filename_component(flatc_executable ${flatc_path} NAME)
file(
RENAME
${flatc_path}
${CURRENT_PACKAGES_DIR}/tools/flatbuffers/${flatc_executable}
)
vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/tools/flatbuffers")
vcpkg_copy_tools(TOOL_NAMES flatc AUTO_CLEAN)
else()
file(APPEND "${CURRENT_PACKAGES_DIR}/share/flatbuffers/FlatbuffersConfig.cmake"
file(APPEND "${CURRENT_PACKAGES_DIR}/share/flatbuffers/Flatbuffers-config.cmake"
"include(\"\${CMAKE_CURRENT_LIST_DIR}/../../../${HOST_TRIPLET}/share/flatbuffers/FlatcTargets.cmake\")\n")
endif()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
# Handle copyright

View File

@ -1,6 +1,6 @@
{
"name": "flatbuffers",
"version": "2.0.6",
"version": "22.10.26",
"description": [
"Memory Efficient Serialization Library",
"FlatBuffers is an efficient cross platform serialization library for games and other memory constrained apps. It allows you to directly access serialized data without unpacking/parsing it first, while still having great forwards/backwards compatibility."

View File

@ -2341,7 +2341,7 @@
"port-version": 0
},
"flatbuffers": {
"baseline": "2.0.6",
"baseline": "22.10.26",
"port-version": 0
},
"flecs": {

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "10986755c27e0640b243331ef23716d3dcbdcba9",
"version": "22.10.26",
"port-version": 0
},
{
"git-tree": "288dddf9e3a03a41f09b5f61547bf8d6b7b888c3",
"version": "2.0.6",