Repository navigation
Conversation
Install relocatable P4Runtime schemas without requiring a compiler or Protobuf. Provide optional C++ message and gRPC libraries, exported targets, and component-aware dependency discovery for installed and parent-project consumers. Exercise schema-only, C++, and gRPC builds, relocated installations, and add_subdirectory consumers in CI. Fixes p4lang#641. Signed-off-by: fruffy <fruffy@nyu.edu>
This branch has not been deployed
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Work in progress.
LLM (GPT Astra) text:
P4Runtime currently has no CMake package, so consumers such as P4C must locate its schemas themselves. This adds
find_package(p4runtime CONFIG)with a relocatable schema directory andp4runtime::schemas, without requiring Protobuf or a compiler for schema-only use.Optional C++ generation provides
p4runtime::cppfor messages andp4runtime::grpcfor service bindings. Installed consumers requestCOMPONENTS cpporgrpc; dependencies are discovered only for those components. Parent projects can reuse their existing Protobuf/gRPC targets, installation defaults off for subprojects, and cross builds can supply host code-generation tools.Validation:
add_subdirectory()consumers pass locally; the same matrix is added to CI.Fixes #641.