Fix headers for protobuf and protobuf_lite so they are the proper lists of files, not just globs. (#10031)

This change makes the headers into actual lists of files, rather than globs. These lists are based on the current cmake definitions.
pull/10039/head
David L. Jones 3 years ago committed by GitHub
parent 043ee2e4e6
commit 34d749df72
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 100
      src/google/protobuf/BUILD.bazel
  2. 2
      src/google/protobuf/compiler/BUILD.bazel
  3. 3
      src/google/protobuf/compiler/cpp/BUILD.bazel
  4. 1
      src/google/protobuf/io/BUILD.bazel
  5. 1
      src/google/protobuf/util/BUILD.bazel

@ -146,10 +146,35 @@ cc_library(
"repeated_ptr_field.cc",
"wire_format_lite.cc",
],
hdrs = glob([
"**/*.h",
"**/*.inc",
]),
hdrs = [
"any.h",
"arena.h",
"arena_impl.h",
"arenastring.h",
"arenaz_sampler.h",
"endian.h",
"explicitly_constructed.h",
"extension_set.h",
"extension_set_inl.h",
"generated_enum_util.h",
"generated_message_tctable_decl.h",
"generated_message_tctable_impl.h",
"generated_message_util.h",
"has_bits.h",
"implicit_weak_message.h",
"inlined_string_field.h",
"map.h",
"map_entry_lite.h",
"map_field_lite.h",
"map_type_handler.h",
"message_lite.h",
"metadata_lite.h",
"parse_context.h",
"port.h",
"repeated_field.h",
"repeated_ptr_field.h",
"wire_format_lite.h",
],
copts = COPTS + select({
"//build_defs:config_msvc": [],
"//conditions:default": [
@ -201,10 +226,38 @@ cc_library(
"wire_format.cc",
"wrappers.pb.cc",
],
hdrs = glob([
"**/*.h",
"**/*.inc",
]),
hdrs = [
"any.pb.h",
"api.pb.h",
"descriptor.h",
"descriptor.pb.h",
"descriptor_database.h",
"duration.pb.h",
"dynamic_message.h",
"empty.pb.h",
"field_access_listener.h",
"field_mask.pb.h",
"generated_enum_reflection.h",
"generated_message_bases.h",
"generated_message_reflection.h",
"map_entry.h",
"map_field.h",
"map_field_inl.h",
"message.h",
"metadata.h",
"reflection.h",
"reflection_internal.h",
"reflection_ops.h",
"service.h",
"source_context.pb.h",
"struct.pb.h",
"text_format.h",
"timestamp.pb.h",
"type.pb.h",
"unknown_field_set.h",
"wire_format.h",
"wrappers.pb.h",
],
copts = COPTS,
include_prefix = "google/protobuf",
linkopts = LINK_OPTS,
@ -454,11 +507,17 @@ cc_library(
hdrs = [
"arena_test_util.h",
"map_lite_test_util.h",
"map_test.inc",
"map_test_util.h",
"map_test_util.inc",
"map_test_util_impl.h",
"message_unittest.inc",
"proto3_lite_unittest.inc",
"reflection_tester.h",
"test_util.h",
"test_util2.h",
"test_util.inc",
"test_util_lite.h",
"wire_format_unittest.inc",
],
copts = COPTS + select({
"//build_defs:config_msvc": [],
@ -467,10 +526,6 @@ cc_library(
],
}),
strip_include_prefix = "/src",
textual_hdrs = [
"map_test_util.inc",
"test_util.inc",
],
visibility = ["//:__subpackages__"],
deps = [
":cc_lite_test_protos",
@ -479,6 +534,19 @@ cc_library(
],
)
cc_library(
name = "test_util2",
testonly = 1,
hdrs = ["test_util2.h"],
strip_include_prefix = "/src",
textual_hdrs = ["test_util.inc"],
visibility = ["//:__subpackages__"],
deps = [
"//src/google/protobuf/io",
"@com_google_googletest//:gtest",
],
)
cc_test(
name = "protobuf_test",
srcs = [
@ -496,15 +564,12 @@ cc_test(
"inlined_string_field_unittest.cc",
"map_field_test.cc",
"map_test.cc",
"map_test.inc",
"message_unittest.cc",
"message_unittest.inc",
"no_field_presence_test.cc",
"preserve_unknown_enum_test.cc",
"proto3_arena_lite_unittest.cc",
"proto3_arena_unittest.cc",
"proto3_lite_unittest.cc",
"proto3_lite_unittest.inc",
"reflection_ops_unittest.cc",
"repeated_field_reflection_unittest.cc",
"repeated_field_unittest.cc",
@ -512,7 +577,6 @@ cc_test(
"unknown_field_set_unittest.cc",
"well_known_types_unittest.cc",
"wire_format_unittest.cc",
"wire_format_unittest.inc",
],
copts = COPTS + select({
"//build_defs:config_msvc": [],
@ -532,11 +596,13 @@ cc_test(
":cc_test_protos",
":protobuf",
":test_util",
":test_util2",
"//src/google/protobuf/testing",
"@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)
################################################################################
# Helper targets for Kotlin tests
################################################################################

@ -199,6 +199,7 @@ cc_test(
":mock_code_generator",
"//:protobuf",
"//src/google/protobuf:cc_test_protos",
"//src/google/protobuf:test_util2",
"//src/google/protobuf/io",
"//src/google/protobuf/stubs",
"//src/google/protobuf/testing",
@ -236,6 +237,7 @@ cc_test(
":importer",
"//:protobuf",
"//src/google/protobuf:cc_test_protos",
"//src/google/protobuf:test_util2",
"//src/google/protobuf/io",
"//src/google/protobuf/stubs",
"//src/google/protobuf/testing",

@ -107,6 +107,8 @@ cc_test(
":unittest_lib",
"//:protobuf",
"//src/google/protobuf:cc_test_protos",
"//src/google/protobuf:test_util",
"//src/google/protobuf:test_util2",
"//src/google/protobuf/compiler:importer",
"//src/google/protobuf/io",
"//src/google/protobuf/stubs",
@ -129,6 +131,7 @@ cc_test(
deps = [
":cpp",
"//:protobuf",
"//src/google/protobuf:test_util2",
"//src/google/protobuf/compiler:importer",
"//src/google/protobuf/io",
"//src/google/protobuf/stubs",

@ -114,6 +114,7 @@ cc_test(
":gzip_stream",
":io",
"//:protobuf",
"//src/google/protobuf:test_util2",
"//src/google/protobuf/testing",
"@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",

@ -27,6 +27,7 @@ cc_test(
deps = [
":delimited_message_util",
"//src/google/protobuf:cc_test_protos",
"//src/google/protobuf:test_util",
"//src/google/protobuf/testing",
"@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",

Loading…
Cancel
Save