Protocol Buffers - Google's data interchange format (grpc依赖)
https://developers.google.com/protocol-buffers/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
152 lines
3.2 KiB
152 lines
3.2 KiB
1 year ago
|
# Protocol Buffers - Google's data interchange format
|
||
|
# Copyright 2023 Google LLC. All rights reserved.
|
||
2 years ago
|
#
|
||
1 year ago
|
# Use of this source code is governed by a BSD-style
|
||
|
# license that can be found in the LICENSE file or at
|
||
|
# https://developers.google.com/open-source/licenses/bsd
|
||
2 years ago
|
|
||
8 months ago
|
load(
|
||
8 months ago
|
"//bazel:cc_proto_library.bzl",
|
||
8 months ago
|
"cc_proto_library",
|
||
|
)
|
||
2 years ago
|
load(
|
||
1 year ago
|
"//bazel:upb_proto_library.bzl",
|
||
1 year ago
|
"upb_c_proto_library",
|
||
2 years ago
|
)
|
||
1 year ago
|
load(
|
||
1 year ago
|
"//protos/bazel:upb_cc_proto_library.bzl",
|
||
1 year ago
|
"upb_cc_proto_library",
|
||
|
)
|
||
8 months ago
|
load(
|
||
|
"//upb/bazel:build_defs.bzl",
|
||
|
"UPB_DEFAULT_CPPOPTS",
|
||
|
)
|
||
2 years ago
|
|
||
2 years ago
|
# begin:google_only
|
||
1 year ago
|
# package(default_applicable_licenses = ["//upb:license"])
|
||
2 years ago
|
# end:google_only
|
||
|
|
||
2 years ago
|
licenses(["notice"])
|
||
|
|
||
|
proto_library(
|
||
|
name = "test_model_proto",
|
||
|
srcs = [
|
||
|
"child_model.proto",
|
||
|
"test_enum.proto",
|
||
|
"test_extension.proto",
|
||
|
"test_model.proto",
|
||
|
],
|
||
|
)
|
||
|
|
||
|
proto_library(
|
||
|
name = "no_package_proto",
|
||
|
srcs = [
|
||
|
"no_package.proto",
|
||
|
],
|
||
|
)
|
||
|
|
||
2 years ago
|
proto_library(
|
||
|
name = "naming_conflict_proto",
|
||
|
srcs = [
|
||
|
"naming_conflict.proto",
|
||
|
],
|
||
|
)
|
||
|
|
||
2 years ago
|
proto_library(
|
||
|
name = "no_package_enum_user_proto",
|
||
|
srcs = [
|
||
|
"no_package_enum_user.proto",
|
||
|
],
|
||
|
deps = [":no_package_proto"],
|
||
|
)
|
||
|
|
||
1 year ago
|
upb_c_proto_library(
|
||
2 years ago
|
name = "test_model_upb_proto",
|
||
|
visibility = [
|
||
1 year ago
|
"//protos:__pkg__",
|
||
2 years ago
|
],
|
||
|
deps = [":test_model_proto"],
|
||
|
)
|
||
|
|
||
|
upb_cc_proto_library(
|
||
|
name = "test_model_upb_cc_proto",
|
||
1 year ago
|
visibility = ["//protos:__pkg__"],
|
||
2 years ago
|
deps = [":test_model_proto"],
|
||
|
)
|
||
|
|
||
2 years ago
|
upb_cc_proto_library(
|
||
|
name = "naming_conflict_upb_cc_proto",
|
||
8 months ago
|
visibility = ["//visibility:private"],
|
||
2 years ago
|
deps = [":naming_conflict_proto"],
|
||
|
)
|
||
|
|
||
2 years ago
|
upb_cc_proto_library(
|
||
|
name = "no_package_upb_cc_proto",
|
||
2 years ago
|
deps = [
|
||
|
":no_package_proto",
|
||
|
],
|
||
|
)
|
||
|
|
||
|
upb_cc_proto_library(
|
||
|
name = "no_package_enum_user_upb_cc_proto",
|
||
|
deps = [
|
||
|
":no_package_enum_user_proto",
|
||
|
],
|
||
2 years ago
|
)
|
||
|
|
||
|
cc_proto_library(
|
||
|
name = "test_model_cc_proto",
|
||
|
deps = [":test_model_proto"],
|
||
|
)
|
||
|
|
||
|
# begin:google_only
|
||
|
# proto_library(
|
||
|
# name = "legacy_name_proto",
|
||
|
# srcs = [
|
||
|
# "legacy-name.proto",
|
||
|
# ],
|
||
|
# )
|
||
|
#
|
||
|
# upb_cc_proto_library(
|
||
|
# name = "legacy_name_test_proto",
|
||
8 months ago
|
# visibility = ["//visibility:private"],
|
||
2 years ago
|
# deps = [":legacy_name_proto"],
|
||
|
# )
|
||
6 months ago
|
#
|
||
|
# proto_library(
|
||
|
# name = "basic_editions_proto",
|
||
|
# srcs = [
|
||
|
# "basic_test_editions.proto",
|
||
|
# ],
|
||
|
# )
|
||
|
#
|
||
|
# upb_cc_proto_library(
|
||
|
# name = "basic_test_editions_proto",
|
||
|
# visibility = ["//visibility:private"],
|
||
|
# deps = [":basic_editions_proto"],
|
||
|
# )
|
||
2 years ago
|
# end:google_only
|
||
|
|
||
|
cc_test(
|
||
|
name = "test_generated_cc_code",
|
||
|
srcs = ["test_generated.cc"],
|
||
|
copts = UPB_DEFAULT_CPPOPTS,
|
||
|
deps = [
|
||
|
# begin:google_only
|
||
11 months ago
|
# ":legacy_name_test_proto",
|
||
2 years ago
|
# end:google_only
|
||
|
":no_package_upb_cc_proto",
|
||
|
":test_model_upb_cc_proto",
|
||
|
":test_model_upb_proto",
|
||
2 years ago
|
":naming_conflict_upb_cc_proto",
|
||
11 months ago
|
"@com_google_googletest//:gtest",
|
||
2 years ago
|
"@com_google_googletest//:gtest_main",
|
||
1 year ago
|
"@com_google_absl//absl/status:statusor",
|
||
|
"@com_google_absl//absl/strings",
|
||
1 year ago
|
"//protos",
|
||
6 months ago
|
"//protos:requires",
|
||
1 year ago
|
"//upb:mem",
|
||
1 year ago
|
"//protos:repeated_field",
|
||
2 years ago
|
],
|
||
|
)
|