-
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.
- Loading branch information
1 parent
9f5db6f
commit 5ff7e25
Showing
65 changed files
with
4,302 additions
and
1,206 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 |
---|---|---|
|
@@ -240,3 +240,7 @@ cython_debug/ | |
|
||
# PyPI Publish | ||
.pypirc | ||
|
||
# Others | ||
.ignore/ | ||
TODO |
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,18 +1,24 @@ | ||
[submodule "third_party/googletest"] | ||
path = third_party/googletest | ||
url = https://github.com/google/googletest.git | ||
[submodule "third_party/zlib"] | ||
path = third_party/zlib | ||
url = https://github.com/zlib-ng/zlib-ng.git | ||
[submodule "third_party/abseil-cpp"] | ||
path = third_party/abseil-cpp | ||
url = https://github.com/abseil/abseil-cpp.git | ||
[submodule "third_party/protobuf"] | ||
path = third_party/protobuf | ||
url = https://github.com/protocolbuffers/protobuf.git | ||
branch = 20240116.1 | ||
[submodule "third_party/googletest"] | ||
path = third_party/googletest | ||
url = https://github.com/google/googletest.git | ||
branch = v1.14.0 | ||
[submodule "third_party/grpc"] | ||
path = third_party/grpc | ||
url = https://github.com/grpc/grpc.git | ||
branch = v1.62.0 | ||
[submodule "third_party/protobuf"] | ||
path = third_party/protobuf | ||
url = https://github.com/protocolbuffers/protobuf.git | ||
branch = v25.3 | ||
[submodule "third_party/qt"] | ||
path = third_party/qt | ||
url = https://code.qt.io/qt/qt5.git | ||
branch = v6.6.2 | ||
[submodule "third_party/zlib"] | ||
path = third_party/zlib | ||
url = https://github.com/zlib-ng/zlib-ng.git | ||
branch = 2.1.6 |
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
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 was deleted.
Oops, something went wrong.
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,84 @@ | ||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index 162fb1c72..f4f32842b 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -41,7 +41,7 @@ else (BUILD_SHARED_LIBS) | ||
endif (BUILD_SHARED_LIBS) | ||
option(protobuf_BUILD_SHARED_LIBS "Build Shared Libraries" ${protobuf_BUILD_SHARED_LIBS_DEFAULT}) | ||
include(CMakeDependentOption) | ||
-cmake_dependent_option(protobuf_MSVC_STATIC_RUNTIME "Link static runtime libraries" ON | ||
+cmake_dependent_option(protobuf_MSVC_STATIC_RUNTIME "Link static runtime libraries" OFF | ||
"NOT protobuf_BUILD_SHARED_LIBS" OFF) | ||
set(protobuf_WITH_ZLIB_DEFAULT ON) | ||
option(protobuf_WITH_ZLIB "Build with zlib support" ${protobuf_WITH_ZLIB_DEFAULT}) | ||
@@ -158,24 +158,16 @@ endif() | ||
|
||
set(_protobuf_FIND_ZLIB) | ||
if (protobuf_WITH_ZLIB) | ||
- find_package(ZLIB) | ||
- if (ZLIB_FOUND) | ||
- set(HAVE_ZLIB 1) | ||
- # FindZLIB module define ZLIB_INCLUDE_DIRS variable | ||
- # Set ZLIB_INCLUDE_DIRECTORIES for compatible | ||
- set(ZLIB_INCLUDE_DIRECTORIES ${ZLIB_INCLUDE_DIRECTORIES} ${ZLIB_INCLUDE_DIRS}) | ||
- # Using imported target if exists | ||
- if (TARGET ZLIB::ZLIB) | ||
- set(ZLIB_LIBRARIES ZLIB::ZLIB) | ||
- set(_protobuf_FIND_ZLIB "if(NOT ZLIB_FOUND)\n find_package(ZLIB)\nendif()") | ||
- endif (TARGET ZLIB::ZLIB) | ||
- else (ZLIB_FOUND) | ||
- set(HAVE_ZLIB 0) | ||
- # Explicitly set these to empty (override NOT_FOUND) so cmake doesn't | ||
- # complain when we use them later. | ||
- set(ZLIB_INCLUDE_DIRECTORIES) | ||
- set(ZLIB_LIBRARIES) | ||
- endif (ZLIB_FOUND) | ||
+ if (NOT TARGET ZLIB::ZLIB) | ||
+ find_package(ZLIB REQUIRED) | ||
+ endif() | ||
+ set(HAVE_ZLIB 1) | ||
+ # FindZLIB module define ZLIB_INCLUDE_DIRS variable | ||
+ # Set ZLIB_INCLUDE_DIRECTORIES for compatible | ||
+ set(ZLIB_INCLUDE_DIRECTORIES ${ZLIB_INCLUDE_DIRECTORIES} ${ZLIB_INCLUDE_DIRS}) | ||
+ # Using imported target if exists | ||
+ set(ZLIB_LIBRARIES ZLIB::ZLIB) | ||
+ set(_protobuf_FIND_ZLIB "if(NOT ZLIB_FOUND AND NOT TARGET ZLIB::ZLIB)\n find_package(ZLIB REQUIRED)\nendif()") | ||
endif (protobuf_WITH_ZLIB) | ||
|
||
# We need to link with libatomic on systems that do not have builtin atomics, or | ||
@@ -277,7 +269,6 @@ else (MSVC) | ||
endif (MSVC) | ||
|
||
include_directories( | ||
- ${ZLIB_INCLUDE_DIRECTORIES} | ||
${protobuf_BINARY_DIR} | ||
${protobuf_SOURCE_DIR}/src) | ||
|
||
diff --git a/cmake/libprotobuf.cmake b/cmake/libprotobuf.cmake | ||
index 422754a1a..ea91898d5 100644 | ||
--- a/cmake/libprotobuf.cmake | ||
+++ b/cmake/libprotobuf.cmake | ||
@@ -26,7 +26,9 @@ endif() | ||
if(${CMAKE_SYSTEM_NAME} STREQUAL "Android") | ||
target_link_libraries(libprotobuf PRIVATE log) | ||
endif() | ||
-target_include_directories(libprotobuf PUBLIC ${protobuf_SOURCE_DIR}/src) | ||
+target_include_directories(libprotobuf PUBLIC | ||
+ ${protobuf_SOURCE_DIR}/src | ||
+ ${protobuf_SOURCE_DIR}) | ||
target_link_libraries(libprotobuf PUBLIC ${protobuf_ABSL_USED_TARGETS}) | ||
protobuf_configure_target(libprotobuf) | ||
if(protobuf_BUILD_SHARED_LIBS) | ||
diff --git a/src/google/protobuf/map_field.h b/src/google/protobuf/map_field.h | ||
index 8aa9e45fe..8388f8a2e 100644 | ||
--- a/src/google/protobuf/map_field.h | ||
+++ b/src/google/protobuf/map_field.h | ||
@@ -678,7 +678,7 @@ class MapField final : public TypeDefinedMapFieldBase<Key, T> { | ||
template <typename Derived, typename Key, typename T, | ||
WireFormatLite::FieldType kKeyFieldType_, | ||
WireFormatLite::FieldType kValueFieldType_> | ||
-constexpr MapFieldBase::VTable | ||
+PROTOBUF_CONSTINIT const MapFieldBase::VTable | ||
MapField<Derived, Key, T, kKeyFieldType_, kValueFieldType_>::kVTable = | ||
MapField::template MakeVTable<MapField>(); | ||
|
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,15 @@ | ||
diff --git a/test/test_main.cc b/test/test_main.cc | ||
index 82b39e48..fb2db610 100644 | ||
--- a/test/test_main.cc | ||
+++ b/test/test_main.cc | ||
@@ -11,7 +11,9 @@ extern "C" { | ||
struct cpu_features test_cpu_features; | ||
} | ||
|
||
-GTEST_API_ int main(int argc, char **argv) { | ||
+GTEST_API_ int main(int argc, char **argv); | ||
+ | ||
+int main(int argc, char **argv) { | ||
printf("Running main() from %s\n", __FILE__); | ||
cpu_check_features(&test_cpu_features); | ||
testing::InitGoogleTest(&argc, argv); |
Oops, something went wrong.