diff --git a/examples/BUILD.bazel b/examples/BUILD.bazel index d5a719ca88..265a0b978d 100644 --- a/examples/BUILD.bazel +++ b/examples/BUILD.bazel @@ -36,13 +36,19 @@ cc_proto_library( cc_binary( name = "add_person_cpp", srcs = ["add_person.cc"], - deps = [":addressbook_cc_proto"], + deps = [ + ":addressbook_cc_proto", + "@com_google_protobuf//:protobuf", + ], ) cc_binary( name = "list_people_cpp", srcs = ["list_people.cc"], - deps = [":addressbook_cc_proto"], + deps = [ + ":addressbook_cc_proto", + "@com_google_protobuf//:protobuf", + ], ) # Similar to cc_proto_library but for Java. diff --git a/src/google/protobuf/BUILD.bazel b/src/google/protobuf/BUILD.bazel index 7969cc4c92..908bf6811b 100644 --- a/src/google/protobuf/BUILD.bazel +++ b/src/google/protobuf/BUILD.bazel @@ -142,6 +142,18 @@ genrule( visibility = ["//visibility:private"], ) +staleness_test( + name = "well_known_types_staleness_test", + outs = + [wkt + ".pb.h" for wkt in WELL_KNOWN_TYPES] + + [wkt + ".pb.cc" for wkt in WELL_KNOWN_TYPES], + generated_pattern = "wkt/google/protobuf/%s", + tags = ["manual"], +) + +# This is necessary for our generated cmake configs to pick up the checked in +# WKT files. +# TODO(b/246826624) Remove this once we generate WKT code from cmake. cc_library( name = "cmake_wkt_cc_proto", srcs = ["wkt/google/protobuf/" + wkt + ".pb.cc" for wkt in WELL_KNOWN_TYPES], @@ -153,16 +165,6 @@ cc_library( deps = [":protobuf_nowkt"], ) - -staleness_test( - name = "well_known_types_staleness_test", - outs = - [wkt + ".pb.h" for wkt in WELL_KNOWN_TYPES] + - [wkt + ".pb.cc" for wkt in WELL_KNOWN_TYPES], - generated_pattern = "wkt/google/protobuf/%s", - tags = ["manual"], -) - # Built-in runtime types proto_library( @@ -855,6 +857,7 @@ cc_library( visibility = ["//:__subpackages__"], deps = [ "//src/google/protobuf/io", + "//src/google/protobuf/util:differencer", "@com_google_googletest//:gtest", ], )