* Avoid exporting build tree targets to installation directory
`export(TARGETS ...)` is meant to allow for build trees to be found
from other projects, however, writing the file to an installation
directory causes buildtree paths to be hardcoded in the installed
protobuf-targets.cmake
* Install protobuf-targets.cmake from target, not build tree
This allows for installation prefixes to match the intended
installation directories, instead of being copied from
the build tree.
This change moves the `pkg_*` rules into the `//pkg` package, which cleans up the root package.
It also adds an experimental `cc_dist_library` rule, which is similar to Bazel's `cc_import` rule. The goal of `cc_dist_library` is to produce output libraries from several targets. For example, splitting `//:protobuf` into multiple targets means that `bazel-bin/libprotobuf.a` won't contain all of the objects. The `cc_dist_library` creates a single library from several different `cc_library` targets. This may be useful for future packaging targets.
* Proof of concept for CMake Abseil dependency
* Hooked up Abseil linking
* Adding test binaries
* Reverting absl::string view use added for testing. This will still be broken for automake and bazel
* Adding new cmake config to dist list
* Whitespace fixes and an attempt at fix for Windows Python Release (CMake version < 3.13)
* Hook up LTS to windows cmake
* Fix 'git cd' typo
* Adding clarifying comment for fix
* Adding abseil dependency to protobuf-lite too
* Update submodules instead of cloning abseil-cpp
* Adding explicit pointer to abseil root directory
Co-authored-by: Jason Lunn <jason.lunn@gmail.com>
Co-authored-by: Jorg Brown <jorg.brown@gmail.com>
This trivial change hints compiler to inline the utf8 helpers and
generate code with better performance.
Tested on skylake, with clang-12 and gcc-9.3. Observed about 10%
improvement from `google_message1_proto3_serialize` benchmark,
with default ./configure parameters. Similar improvement on arm.
This is the most recent Abseil LTS branch, from November 2021. We do not
yet use Abseil for anything, but this change will make it possible to
start using it in Bazel when we're ready.
unistack-org/micro (microservices framework) uses protoc-gen-go-micro generator that has extension support for additional framework related options.
It is currently not using any registered extension number, so i want to stabilise this and i think that this is a good thing.
See here for an example of the extenstion in action.
Co-authored-by: Adam Cozzette <acozzette@google.com>
* Fix NPE during encoding and add regression test for issue 9507.
(cherry picked from commit 58e320a732)
* Implement `respond_to?` in RubyMessage (#9677)
All synthetic methods implemented by `method_missing` are now supported by `respond_to?`.
Fixes issue #9202.
* Fix null pointer exceptions exposed by new regression tests.
* Fix clear_ on oneofs so that it is safe to call repeatedly and so that respond_to? does not depend on whether the oneof is currently cleared.
* Code cleanup: reenable more tests on JRuby.
* Align JRuby behavior with CRuby by throwing a RuntimeError when attempting to assign to a oneof.
(cherry picked from commit 8e7f936696)
* Update protobuf version
* Merge pull request #9727 from mlocati/build-packaged-php-extension
Fix building packaged PHP extension
(cherry picked from commit 7f9901c5f6)
* Update protobuf version
* Update changelogs for 3.20.1-rc1
Co-authored-by: Jason Lunn <jason.lunn@gmail.com>
Co-authored-by: Jorg Brown <jorg.brown@gmail.com>
This will address the following compilation error:
```
src/google/protobuf/compiler/python/python_generator.cc:95:13: warning: unused function 'HasTopLevelEnums' [-Wunused-function]
```