Change update_file_lists.sh to work based on Bazel-generated file lists (#10091)

This commit changes update_file_lists.sh to use Bazel as the source of truth. Currently, only the cmake build is actually affected, but Automake should be fairly straightforward to convert.

The file lists were originally factored out in PR#10027. This commit actually switches over to the Bazel-generated lists.
pull/10103/head
David L. Jones 3 years ago committed by GitHub
parent 45b7f62b1b
commit dc14b4be42
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      cmake/libprotobuf.cmake
  2. 3
      cmake/tests.cmake
  3. 417
      src/file_lists.cmake
  4. 195
      update_file_lists.sh

@ -3,7 +3,6 @@
include(${protobuf_SOURCE_DIR}/src/file_lists.cmake)
add_library(libprotobuf ${protobuf_SHARED_OR_STATIC}
${libprotobuf_lite_srcs}
${libprotobuf_srcs}
${libprotobuf_hdrs}
${protobuf_version_rc_file})

@ -94,6 +94,7 @@ target_link_libraries(protobuf-test-common libprotobuf GTest::gmock)
set(tests_files
${protobuf_test_files}
${compiler_test_files}
${annotation_test_util_srcs}
${io_test_files}
${util_test_files}
${stubs_test_files}
@ -132,9 +133,9 @@ endif()
target_link_libraries(tests protobuf-lite-test-common protobuf-test-common libprotoc libprotobuf GTest::gmock_main)
set(test_plugin_files
${test_plugin_files}
${mock_code_generator_srcs}
${testing_srcs}
${test_plugin_srcs}
)
add_executable(test_plugin ${test_plugin_files})

@ -1,11 +1,23 @@
# Source file lists
# Auto-generated by //pkg:gen_src_file_lists_cmake
#
# This file should be included from other cmake definitions.
# This file contains lists of sources based on Bazel rules. It should
# be included from a hand-written CMake file that defines targets.
#
# Changes to this file will be overwritten based on Bazel definitions.
if(${CMAKE_VERSION} VERSION_GREATER 3.10 OR ${CMAKE_VERSION} VERSION_EQUAL 3.10)
include_guard()
endif()
# //pkg:protobuf
set(libprotobuf_srcs
${protobuf_SOURCE_DIR}/src/google/protobuf/any.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/any.pb.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/any_lite.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/api.pb.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/arena.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/arenastring.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/arenaz_sampler.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/importer.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/parser.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/descriptor.cc
@ -14,21 +26,48 @@ set(libprotobuf_srcs
${protobuf_SOURCE_DIR}/src/google/protobuf/duration.pb.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/dynamic_message.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/empty.pb.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/extension_set.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/extension_set_heavy.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/field_mask.pb.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/generated_enum_util.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/generated_message_bases.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/generated_message_reflection.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/generated_message_tctable_full.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/generated_message_tctable_lite.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/generated_message_util.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/implicit_weak_message.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/inlined_string_field.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/io/coded_stream.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/io/gzip_stream.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/io/io_win32.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/io/printer.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/io/strtod.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/io/tokenizer.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/io/zero_copy_stream.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/io/zero_copy_stream_impl.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/io/zero_copy_stream_impl_lite.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/map.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/map_field.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/message.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/message_lite.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/parse_context.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/reflection_ops.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/repeated_field.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/repeated_ptr_field.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/service.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/source_context.pb.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/struct.pb.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/stubs/bytestream.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/stubs/common.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/stubs/int128.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/stubs/status.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/stubs/statusor.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/stubs/stringpiece.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/stubs/stringprintf.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/stubs/structurally_valid.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/stubs/strutil.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/stubs/substitute.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/stubs/time.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/text_format.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/timestamp.pb.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/type.pb.cc
@ -54,12 +93,19 @@ set(libprotobuf_srcs
${protobuf_SOURCE_DIR}/src/google/protobuf/util/time_util.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/util/type_resolver_util.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/wire_format.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/wire_format_lite.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/wrappers.pb.cc
)
# //pkg:protobuf
set(libprotobuf_hdrs
${protobuf_SOURCE_DIR}/src/google/protobuf/any.h
${protobuf_SOURCE_DIR}/src/google/protobuf/any.pb.h
${protobuf_SOURCE_DIR}/src/google/protobuf/api.pb.h
${protobuf_SOURCE_DIR}/src/google/protobuf/arena.h
${protobuf_SOURCE_DIR}/src/google/protobuf/arena_impl.h
${protobuf_SOURCE_DIR}/src/google/protobuf/arenastring.h
${protobuf_SOURCE_DIR}/src/google/protobuf/arenaz_sampler.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/importer.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/parser.h
${protobuf_SOURCE_DIR}/src/google/protobuf/descriptor.h
@ -68,25 +114,76 @@ set(libprotobuf_hdrs
${protobuf_SOURCE_DIR}/src/google/protobuf/duration.pb.h
${protobuf_SOURCE_DIR}/src/google/protobuf/dynamic_message.h
${protobuf_SOURCE_DIR}/src/google/protobuf/empty.pb.h
${protobuf_SOURCE_DIR}/src/google/protobuf/endian.h
${protobuf_SOURCE_DIR}/src/google/protobuf/explicitly_constructed.h
${protobuf_SOURCE_DIR}/src/google/protobuf/extension_set.h
${protobuf_SOURCE_DIR}/src/google/protobuf/extension_set_inl.h
${protobuf_SOURCE_DIR}/src/google/protobuf/field_access_listener.h
${protobuf_SOURCE_DIR}/src/google/protobuf/field_mask.pb.h
${protobuf_SOURCE_DIR}/src/google/protobuf/generated_enum_reflection.h
${protobuf_SOURCE_DIR}/src/google/protobuf/generated_enum_util.h
${protobuf_SOURCE_DIR}/src/google/protobuf/generated_message_bases.h
${protobuf_SOURCE_DIR}/src/google/protobuf/generated_message_reflection.h
${protobuf_SOURCE_DIR}/src/google/protobuf/generated_message_tctable_decl.h
${protobuf_SOURCE_DIR}/src/google/protobuf/generated_message_tctable_impl.h
${protobuf_SOURCE_DIR}/src/google/protobuf/generated_message_util.h
${protobuf_SOURCE_DIR}/src/google/protobuf/has_bits.h
${protobuf_SOURCE_DIR}/src/google/protobuf/implicit_weak_message.h
${protobuf_SOURCE_DIR}/src/google/protobuf/inlined_string_field.h
${protobuf_SOURCE_DIR}/src/google/protobuf/io/coded_stream.h
${protobuf_SOURCE_DIR}/src/google/protobuf/io/gzip_stream.h
${protobuf_SOURCE_DIR}/src/google/protobuf/io/io_win32.h
${protobuf_SOURCE_DIR}/src/google/protobuf/io/printer.h
${protobuf_SOURCE_DIR}/src/google/protobuf/io/strtod.h
${protobuf_SOURCE_DIR}/src/google/protobuf/io/tokenizer.h
${protobuf_SOURCE_DIR}/src/google/protobuf/io/zero_copy_stream.h
${protobuf_SOURCE_DIR}/src/google/protobuf/io/zero_copy_stream_impl.h
${protobuf_SOURCE_DIR}/src/google/protobuf/io/zero_copy_stream_impl_lite.h
${protobuf_SOURCE_DIR}/src/google/protobuf/map.h
${protobuf_SOURCE_DIR}/src/google/protobuf/map_entry.h
${protobuf_SOURCE_DIR}/src/google/protobuf/map_entry_lite.h
${protobuf_SOURCE_DIR}/src/google/protobuf/map_field.h
${protobuf_SOURCE_DIR}/src/google/protobuf/map_field_inl.h
${protobuf_SOURCE_DIR}/src/google/protobuf/map_field_lite.h
${protobuf_SOURCE_DIR}/src/google/protobuf/map_type_handler.h
${protobuf_SOURCE_DIR}/src/google/protobuf/message.h
${protobuf_SOURCE_DIR}/src/google/protobuf/message_lite.h
${protobuf_SOURCE_DIR}/src/google/protobuf/metadata.h
${protobuf_SOURCE_DIR}/src/google/protobuf/metadata_lite.h
${protobuf_SOURCE_DIR}/src/google/protobuf/parse_context.h
${protobuf_SOURCE_DIR}/src/google/protobuf/port.h
${protobuf_SOURCE_DIR}/src/google/protobuf/reflection.h
${protobuf_SOURCE_DIR}/src/google/protobuf/reflection_internal.h
${protobuf_SOURCE_DIR}/src/google/protobuf/reflection_ops.h
${protobuf_SOURCE_DIR}/src/google/protobuf/repeated_field.h
${protobuf_SOURCE_DIR}/src/google/protobuf/repeated_ptr_field.h
${protobuf_SOURCE_DIR}/src/google/protobuf/service.h
${protobuf_SOURCE_DIR}/src/google/protobuf/source_context.pb.h
${protobuf_SOURCE_DIR}/src/google/protobuf/struct.pb.h
${protobuf_SOURCE_DIR}/src/google/protobuf/stubs/bytestream.h
${protobuf_SOURCE_DIR}/src/google/protobuf/stubs/callback.h
${protobuf_SOURCE_DIR}/src/google/protobuf/stubs/casts.h
${protobuf_SOURCE_DIR}/src/google/protobuf/stubs/common.h
${protobuf_SOURCE_DIR}/src/google/protobuf/stubs/hash.h
${protobuf_SOURCE_DIR}/src/google/protobuf/stubs/int128.h
${protobuf_SOURCE_DIR}/src/google/protobuf/stubs/logging.h
${protobuf_SOURCE_DIR}/src/google/protobuf/stubs/macros.h
${protobuf_SOURCE_DIR}/src/google/protobuf/stubs/map_util.h
${protobuf_SOURCE_DIR}/src/google/protobuf/stubs/mathutil.h
${protobuf_SOURCE_DIR}/src/google/protobuf/stubs/mutex.h
${protobuf_SOURCE_DIR}/src/google/protobuf/stubs/once.h
${protobuf_SOURCE_DIR}/src/google/protobuf/stubs/platform_macros.h
${protobuf_SOURCE_DIR}/src/google/protobuf/stubs/port.h
${protobuf_SOURCE_DIR}/src/google/protobuf/stubs/status.h
${protobuf_SOURCE_DIR}/src/google/protobuf/stubs/status_macros.h
${protobuf_SOURCE_DIR}/src/google/protobuf/stubs/statusor.h
${protobuf_SOURCE_DIR}/src/google/protobuf/stubs/stl_util.h
${protobuf_SOURCE_DIR}/src/google/protobuf/stubs/stringpiece.h
${protobuf_SOURCE_DIR}/src/google/protobuf/stubs/stringprintf.h
${protobuf_SOURCE_DIR}/src/google/protobuf/stubs/strutil.h
${protobuf_SOURCE_DIR}/src/google/protobuf/stubs/substitute.h
${protobuf_SOURCE_DIR}/src/google/protobuf/stubs/template_util.h
${protobuf_SOURCE_DIR}/src/google/protobuf/stubs/time.h
${protobuf_SOURCE_DIR}/src/google/protobuf/text_format.h
${protobuf_SOURCE_DIR}/src/google/protobuf/timestamp.pb.h
${protobuf_SOURCE_DIR}/src/google/protobuf/type.pb.h
@ -94,15 +191,34 @@ set(libprotobuf_hdrs
${protobuf_SOURCE_DIR}/src/google/protobuf/util/delimited_message_util.h
${protobuf_SOURCE_DIR}/src/google/protobuf/util/field_comparator.h
${protobuf_SOURCE_DIR}/src/google/protobuf/util/field_mask_util.h
${protobuf_SOURCE_DIR}/src/google/protobuf/util/internal/datapiece.h
${protobuf_SOURCE_DIR}/src/google/protobuf/util/internal/default_value_objectwriter.h
${protobuf_SOURCE_DIR}/src/google/protobuf/util/internal/error_listener.h
${protobuf_SOURCE_DIR}/src/google/protobuf/util/internal/field_mask_utility.h
${protobuf_SOURCE_DIR}/src/google/protobuf/util/internal/json_escaping.h
${protobuf_SOURCE_DIR}/src/google/protobuf/util/internal/json_objectwriter.h
${protobuf_SOURCE_DIR}/src/google/protobuf/util/internal/json_stream_parser.h
${protobuf_SOURCE_DIR}/src/google/protobuf/util/internal/location_tracker.h
${protobuf_SOURCE_DIR}/src/google/protobuf/util/internal/object_location_tracker.h
${protobuf_SOURCE_DIR}/src/google/protobuf/util/internal/object_source.h
${protobuf_SOURCE_DIR}/src/google/protobuf/util/internal/object_writer.h
${protobuf_SOURCE_DIR}/src/google/protobuf/util/internal/proto_writer.h
${protobuf_SOURCE_DIR}/src/google/protobuf/util/internal/protostream_objectsource.h
${protobuf_SOURCE_DIR}/src/google/protobuf/util/internal/protostream_objectwriter.h
${protobuf_SOURCE_DIR}/src/google/protobuf/util/internal/structured_objectwriter.h
${protobuf_SOURCE_DIR}/src/google/protobuf/util/internal/type_info.h
${protobuf_SOURCE_DIR}/src/google/protobuf/util/internal/utility.h
${protobuf_SOURCE_DIR}/src/google/protobuf/util/json_util.h
${protobuf_SOURCE_DIR}/src/google/protobuf/util/message_differencer.h
${protobuf_SOURCE_DIR}/src/google/protobuf/util/time_util.h
${protobuf_SOURCE_DIR}/src/google/protobuf/util/type_resolver.h
${protobuf_SOURCE_DIR}/src/google/protobuf/util/type_resolver_util.h
${protobuf_SOURCE_DIR}/src/google/protobuf/wire_format.h
${protobuf_SOURCE_DIR}/src/google/protobuf/wire_format_lite.h
${protobuf_SOURCE_DIR}/src/google/protobuf/wrappers.pb.h
)
# //pkg:protobuf_lite
set(libprotobuf_lite_srcs
${protobuf_SOURCE_DIR}/src/google/protobuf/any_lite.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/arena.cc
@ -116,7 +232,6 @@ set(libprotobuf_lite_srcs
${protobuf_SOURCE_DIR}/src/google/protobuf/inlined_string_field.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/io/coded_stream.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/io/io_win32.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/io/strtod.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/io/zero_copy_stream.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/io/zero_copy_stream_impl.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/io/zero_copy_stream_impl_lite.cc
@ -138,6 +253,7 @@ set(libprotobuf_lite_srcs
${protobuf_SOURCE_DIR}/src/google/protobuf/wire_format_lite.cc
)
# //pkg:protobuf_lite
set(libprotobuf_lite_hdrs
${protobuf_SOURCE_DIR}/src/google/protobuf/any.h
${protobuf_SOURCE_DIR}/src/google/protobuf/arena.h
@ -157,7 +273,6 @@ set(libprotobuf_lite_hdrs
${protobuf_SOURCE_DIR}/src/google/protobuf/inlined_string_field.h
${protobuf_SOURCE_DIR}/src/google/protobuf/io/coded_stream.h
${protobuf_SOURCE_DIR}/src/google/protobuf/io/io_win32.h
${protobuf_SOURCE_DIR}/src/google/protobuf/io/strtod.h
${protobuf_SOURCE_DIR}/src/google/protobuf/io/zero_copy_stream.h
${protobuf_SOURCE_DIR}/src/google/protobuf/io/zero_copy_stream_impl.h
${protobuf_SOURCE_DIR}/src/google/protobuf/io/zero_copy_stream_impl_lite.h
@ -176,21 +291,28 @@ set(libprotobuf_lite_hdrs
${protobuf_SOURCE_DIR}/src/google/protobuf/stubs/casts.h
${protobuf_SOURCE_DIR}/src/google/protobuf/stubs/common.h
${protobuf_SOURCE_DIR}/src/google/protobuf/stubs/hash.h
${protobuf_SOURCE_DIR}/src/google/protobuf/stubs/int128.h
${protobuf_SOURCE_DIR}/src/google/protobuf/stubs/logging.h
${protobuf_SOURCE_DIR}/src/google/protobuf/stubs/macros.h
${protobuf_SOURCE_DIR}/src/google/protobuf/stubs/map_util.h
${protobuf_SOURCE_DIR}/src/google/protobuf/stubs/mathutil.h
${protobuf_SOURCE_DIR}/src/google/protobuf/stubs/mutex.h
${protobuf_SOURCE_DIR}/src/google/protobuf/stubs/once.h
${protobuf_SOURCE_DIR}/src/google/protobuf/stubs/platform_macros.h
${protobuf_SOURCE_DIR}/src/google/protobuf/stubs/port.h
${protobuf_SOURCE_DIR}/src/google/protobuf/stubs/status.h
${protobuf_SOURCE_DIR}/src/google/protobuf/stubs/status_macros.h
${protobuf_SOURCE_DIR}/src/google/protobuf/stubs/statusor.h
${protobuf_SOURCE_DIR}/src/google/protobuf/stubs/stl_util.h
${protobuf_SOURCE_DIR}/src/google/protobuf/stubs/stringpiece.h
${protobuf_SOURCE_DIR}/src/google/protobuf/stubs/stringprintf.h
${protobuf_SOURCE_DIR}/src/google/protobuf/stubs/strutil.h
${protobuf_SOURCE_DIR}/src/google/protobuf/stubs/template_util.h
${protobuf_SOURCE_DIR}/src/google/protobuf/stubs/time.h
${protobuf_SOURCE_DIR}/src/google/protobuf/wire_format_lite.h
)
# //pkg:protoc
set(libprotoc_srcs
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/code_generator.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/command_line_interface.cc
@ -277,47 +399,192 @@ set(libprotoc_srcs
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/zip_writer.cc
)
# //pkg:protoc
set(libprotoc_hdrs
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/code_generator.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/command_line_interface.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/cpp/cpp_generator.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/cpp/enum.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/cpp/enum_field.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/cpp/extension.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/cpp/field.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/cpp/file.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/cpp/generator.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/cpp/helpers.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/cpp/map_field.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/cpp/message.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/cpp/message_field.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/cpp/message_layout_helper.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/cpp/names.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/cpp/options.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/cpp/padding_optimizer.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/cpp/parse_function_generator.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/cpp/primitive_field.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/cpp/service.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/cpp/string_field.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/csharp/csharp_doc_comment.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/csharp/csharp_enum.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/csharp/csharp_enum_field.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/csharp/csharp_field_base.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/csharp/csharp_generator.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/csharp/csharp_helpers.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/csharp/csharp_map_field.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/csharp/csharp_message.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/csharp/csharp_message_field.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/csharp/csharp_names.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/csharp/csharp_options.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/csharp/csharp_primitive_field.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/csharp/csharp_reflection_class.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/csharp/csharp_repeated_enum_field.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/csharp/csharp_repeated_message_field.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/csharp/csharp_repeated_primitive_field.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/csharp/csharp_source_generator_base.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/csharp/csharp_wrapper_field.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/java/context.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/java/doc_comment.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/java/enum.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/java/enum_field.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/java/enum_field_lite.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/java/enum_lite.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/java/extension.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/java/extension_lite.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/java/field.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/java/file.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/java/generator.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/java/java_generator.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/java/generator_factory.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/java/helpers.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/java/kotlin_generator.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/java/map_field.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/java/map_field_lite.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/java/message.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/java/message_builder.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/java/message_builder_lite.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/java/message_field.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/java/message_field_lite.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/java/message_lite.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/java/name_resolver.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/java/names.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/java/options.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/java/primitive_field.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/java/primitive_field_lite.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/java/service.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/java/shared_code_generator.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/java/string_field.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/java/string_field_lite.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/objectivec/objectivec_enum.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/objectivec/objectivec_enum_field.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/objectivec/objectivec_extension.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/objectivec/objectivec_field.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/objectivec/objectivec_file.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/objectivec/objectivec_generator.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/objectivec/objectivec_helpers.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/objectivec/objectivec_map_field.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/objectivec/objectivec_message.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/objectivec/objectivec_message_field.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/objectivec/objectivec_nsobject_methods.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/objectivec/objectivec_oneof.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/objectivec/objectivec_primitive_field.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/php/php_generator.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/plugin.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/plugin.pb.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/python/generator.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/python/helpers.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/python/pyi_generator.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/python/python_generator.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/ruby/ruby_generator.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/scc.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/subprocess.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/zip_writer.h
)
# //src/google/protobuf:well_known_type_protos
set(wkt_protos_files
${protobuf_SOURCE_DIR}/src/google/protobuf/any.proto
${protobuf_SOURCE_DIR}/src/google/protobuf/api.proto
${protobuf_SOURCE_DIR}/src/google/protobuf/duration.proto
${protobuf_SOURCE_DIR}/src/google/protobuf/empty.proto
${protobuf_SOURCE_DIR}/src/google/protobuf/field_mask.proto
${protobuf_SOURCE_DIR}/src/google/protobuf/source_context.proto
${protobuf_SOURCE_DIR}/src/google/protobuf/struct.proto
${protobuf_SOURCE_DIR}/src/google/protobuf/timestamp.proto
${protobuf_SOURCE_DIR}/src/google/protobuf/type.proto
${protobuf_SOURCE_DIR}/src/google/protobuf/wrappers.proto
)
# //src/google/protobuf:descriptor_proto
set(descriptor_proto_proto_srcs
${protobuf_SOURCE_DIR}/src/google/protobuf/descriptor.proto
)
# //src/google/protobuf:descriptor_proto
set(descriptor_proto_srcs
${protobuf_SOURCE_DIR}/src/google/protobuf/descriptor.proto.pb.cc
)
# //src/google/protobuf:descriptor_proto
set(descriptor_proto_hdrs
${protobuf_SOURCE_DIR}/src/google/protobuf/descriptor.proto.pb.h
)
# //src/google/protobuf:descriptor_proto
set(descriptor_proto_files
${protobuf_SOURCE_DIR}/src/google/protobuf/descriptor_proto-descriptor-set.proto.bin
)
# //src/google/protobuf/compiler:plugin_proto
set(plugin_proto_proto_srcs
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/plugin.proto
)
# //src/google/protobuf/compiler:plugin_proto
set(plugin_proto_srcs
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/plugin.proto.pb.cc
)
# //src/google/protobuf/compiler:plugin_proto
set(plugin_proto_hdrs
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/plugin.proto.pb.h
)
# //src/google/protobuf/compiler:plugin_proto
set(plugin_proto_files
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/plugin_proto-descriptor-set.proto.bin
)
# //pkg:lite_test_util
set(lite_test_util_srcs
${protobuf_SOURCE_DIR}/src/google/protobuf/arena_test_util.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/map_lite_test_util.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/test_util_lite.cc
)
# //pkg:lite_test_util
set(lite_test_util_hdrs
${protobuf_SOURCE_DIR}/src/google/protobuf/arena_test_util.h
${protobuf_SOURCE_DIR}/src/google/protobuf/map_lite_test_util.h
${protobuf_SOURCE_DIR}/src/google/protobuf/map_test_util_impl.h
${protobuf_SOURCE_DIR}/src/google/protobuf/proto3_lite_unittest.inc
${protobuf_SOURCE_DIR}/src/google/protobuf/test_util_lite.h
)
# //pkg:test_util
set(test_util_srcs
${protobuf_SOURCE_DIR}/src/google/protobuf/reflection_tester.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/test_util.cc
)
# //pkg:test_util
set(test_util_hdrs
${protobuf_SOURCE_DIR}/src/google/protobuf/map_test.inc
${protobuf_SOURCE_DIR}/src/google/protobuf/map_test_util.h
${protobuf_SOURCE_DIR}/src/google/protobuf/map_test_util.inc
${protobuf_SOURCE_DIR}/src/google/protobuf/message_unittest.inc
${protobuf_SOURCE_DIR}/src/google/protobuf/reflection_tester.h
${protobuf_SOURCE_DIR}/src/google/protobuf/test_util.h
${protobuf_SOURCE_DIR}/src/google/protobuf/test_util.inc
${protobuf_SOURCE_DIR}/src/google/protobuf/test_util_lite.h
${protobuf_SOURCE_DIR}/src/google/protobuf/wire_format_unittest.inc
)
# //src/google/protobuf:full_test_srcs
set(protobuf_test_files
${protobuf_SOURCE_DIR}/src/google/protobuf/any_test.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/arena_unittest.cc
@ -333,15 +600,12 @@ set(protobuf_test_files
${protobuf_SOURCE_DIR}/src/google/protobuf/inlined_string_field_unittest.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/map_field_test.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/map_test.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/map_test.inc
${protobuf_SOURCE_DIR}/src/google/protobuf/message_unittest.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/message_unittest.inc
${protobuf_SOURCE_DIR}/src/google/protobuf/no_field_presence_test.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/preserve_unknown_enum_test.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/proto3_arena_lite_unittest.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/proto3_arena_unittest.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/proto3_lite_unittest.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/proto3_lite_unittest.inc
${protobuf_SOURCE_DIR}/src/google/protobuf/reflection_ops_unittest.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/repeated_field_reflection_unittest.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/repeated_field_unittest.cc
@ -349,9 +613,9 @@ set(protobuf_test_files
${protobuf_SOURCE_DIR}/src/google/protobuf/unknown_field_set_unittest.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/well_known_types_unittest.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/wire_format_unittest.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/wire_format_unittest.inc
)
# //src/google/protobuf:test_protos
set(protobuf_test_protos_proto_srcs
${protobuf_SOURCE_DIR}/src/google/protobuf/any_test.proto
${protobuf_SOURCE_DIR}/src/google/protobuf/map_proto2_unittest.proto
@ -384,11 +648,84 @@ set(protobuf_test_protos_proto_srcs
${protobuf_SOURCE_DIR}/src/google/protobuf/unittest_well_known_types.proto
)
# //src/google/protobuf:test_protos
set(protobuf_test_protos_srcs
${protobuf_SOURCE_DIR}/src/google/protobuf/any_test.proto.pb.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/map_proto2_unittest.proto.pb.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/map_unittest.proto.pb.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/unittest.proto.pb.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/unittest_arena.proto.pb.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/unittest_custom_options.proto.pb.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/unittest_drop_unknown_fields.proto.pb.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/unittest_embed_optimize_for.proto.pb.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/unittest_empty.proto.pb.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/unittest_enormous_descriptor.proto.pb.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/unittest_import.proto.pb.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/unittest_import_public.proto.pb.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/unittest_lazy_dependencies.proto.pb.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/unittest_lazy_dependencies_custom_option.proto.pb.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/unittest_lazy_dependencies_enum.proto.pb.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/unittest_lite_imports_nonlite.proto.pb.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/unittest_mset.proto.pb.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/unittest_mset_wire_format.proto.pb.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/unittest_no_field_presence.proto.pb.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/unittest_no_generic_services.proto.pb.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/unittest_optimize_for.proto.pb.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/unittest_preserve_unknown_enum.proto.pb.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/unittest_preserve_unknown_enum2.proto.pb.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/unittest_proto3.proto.pb.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/unittest_proto3_arena.proto.pb.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/unittest_proto3_arena_lite.proto.pb.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/unittest_proto3_lite.proto.pb.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/unittest_proto3_optional.proto.pb.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/unittest_well_known_types.proto.pb.cc
)
# //src/google/protobuf:test_protos
set(protobuf_test_protos_hdrs
${protobuf_SOURCE_DIR}/src/google/protobuf/any_test.proto.pb.h
${protobuf_SOURCE_DIR}/src/google/protobuf/map_proto2_unittest.proto.pb.h
${protobuf_SOURCE_DIR}/src/google/protobuf/map_unittest.proto.pb.h
${protobuf_SOURCE_DIR}/src/google/protobuf/unittest.proto.pb.h
${protobuf_SOURCE_DIR}/src/google/protobuf/unittest_arena.proto.pb.h
${protobuf_SOURCE_DIR}/src/google/protobuf/unittest_custom_options.proto.pb.h
${protobuf_SOURCE_DIR}/src/google/protobuf/unittest_drop_unknown_fields.proto.pb.h
${protobuf_SOURCE_DIR}/src/google/protobuf/unittest_embed_optimize_for.proto.pb.h
${protobuf_SOURCE_DIR}/src/google/protobuf/unittest_empty.proto.pb.h
${protobuf_SOURCE_DIR}/src/google/protobuf/unittest_enormous_descriptor.proto.pb.h
${protobuf_SOURCE_DIR}/src/google/protobuf/unittest_import.proto.pb.h
${protobuf_SOURCE_DIR}/src/google/protobuf/unittest_import_public.proto.pb.h
${protobuf_SOURCE_DIR}/src/google/protobuf/unittest_lazy_dependencies.proto.pb.h
${protobuf_SOURCE_DIR}/src/google/protobuf/unittest_lazy_dependencies_custom_option.proto.pb.h
${protobuf_SOURCE_DIR}/src/google/protobuf/unittest_lazy_dependencies_enum.proto.pb.h
${protobuf_SOURCE_DIR}/src/google/protobuf/unittest_lite_imports_nonlite.proto.pb.h
${protobuf_SOURCE_DIR}/src/google/protobuf/unittest_mset.proto.pb.h
${protobuf_SOURCE_DIR}/src/google/protobuf/unittest_mset_wire_format.proto.pb.h
${protobuf_SOURCE_DIR}/src/google/protobuf/unittest_no_field_presence.proto.pb.h
${protobuf_SOURCE_DIR}/src/google/protobuf/unittest_no_generic_services.proto.pb.h
${protobuf_SOURCE_DIR}/src/google/protobuf/unittest_optimize_for.proto.pb.h
${protobuf_SOURCE_DIR}/src/google/protobuf/unittest_preserve_unknown_enum.proto.pb.h
${protobuf_SOURCE_DIR}/src/google/protobuf/unittest_preserve_unknown_enum2.proto.pb.h
${protobuf_SOURCE_DIR}/src/google/protobuf/unittest_proto3.proto.pb.h
${protobuf_SOURCE_DIR}/src/google/protobuf/unittest_proto3_arena.proto.pb.h
${protobuf_SOURCE_DIR}/src/google/protobuf/unittest_proto3_arena_lite.proto.pb.h
${protobuf_SOURCE_DIR}/src/google/protobuf/unittest_proto3_lite.proto.pb.h
${protobuf_SOURCE_DIR}/src/google/protobuf/unittest_proto3_optional.proto.pb.h
${protobuf_SOURCE_DIR}/src/google/protobuf/unittest_well_known_types.proto.pb.h
)
# //src/google/protobuf:test_protos
set(protobuf_test_protos_files
${protobuf_SOURCE_DIR}/src/google/protobuf/test_protos-descriptor-set.proto.bin
)
# //src/google/protobuf:lite_test_srcs
set(protobuf_lite_test_files
${protobuf_SOURCE_DIR}/src/google/protobuf/lite_arena_unittest.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/lite_unittest.cc
)
# //src/google/protobuf:lite_test_protos
set(protobuf_lite_test_protos_proto_srcs
${protobuf_SOURCE_DIR}/src/google/protobuf/map_lite_unittest.proto
${protobuf_SOURCE_DIR}/src/google/protobuf/unittest_import_lite.proto
@ -396,9 +733,29 @@ set(protobuf_lite_test_protos_proto_srcs
${protobuf_SOURCE_DIR}/src/google/protobuf/unittest_lite.proto
)
# //src/google/protobuf:lite_test_protos
set(protobuf_lite_test_protos_srcs
${protobuf_SOURCE_DIR}/src/google/protobuf/map_lite_unittest.proto.pb.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/unittest_import_lite.proto.pb.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/unittest_import_public_lite.proto.pb.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/unittest_lite.proto.pb.cc
)
# //src/google/protobuf:lite_test_protos
set(protobuf_lite_test_protos_hdrs
${protobuf_SOURCE_DIR}/src/google/protobuf/map_lite_unittest.proto.pb.h
${protobuf_SOURCE_DIR}/src/google/protobuf/unittest_import_lite.proto.pb.h
${protobuf_SOURCE_DIR}/src/google/protobuf/unittest_import_public_lite.proto.pb.h
${protobuf_SOURCE_DIR}/src/google/protobuf/unittest_lite.proto.pb.h
)
# //src/google/protobuf:lite_test_protos
set(protobuf_lite_test_protos_files
${protobuf_SOURCE_DIR}/src/google/protobuf/lite_test_protos-descriptor-set.proto.bin
)
# //src/google/protobuf/compiler:test_srcs
set(compiler_test_files
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/annotation_test_util.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/annotation_test_util.h
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/command_line_interface_unittest.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/cpp/bootstrap_unittest.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/cpp/message_size_unittest.cc
@ -406,7 +763,6 @@ set(compiler_test_files
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/cpp/move_unittest.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/cpp/plugin_unittest.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/cpp/unittest.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/cpp/unittest.inc
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/csharp/csharp_bootstrap_unittest.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/csharp/csharp_generator_unittest.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/importer_unittest.cc
@ -418,19 +774,38 @@ set(compiler_test_files
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/ruby/ruby_generator_unittest.cc
)
# //pkg:compiler_annotation_test_util
set(annotation_test_util_srcs
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/annotation_test_util.cc
)
# //pkg:compiler_annotation_test_util
set(annotation_test_util_hdrs
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/annotation_test_util.h
)
# //pkg:compiler_mock_code_generator
set(mock_code_generator_srcs
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/mock_code_generator.cc
)
set(test_plugin_srcs
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/test_plugin.cc
# //pkg:compiler_mock_code_generator
set(mock_code_generator_hdrs
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/mock_code_generator.h
)
# //src/google/protobuf/compiler:test_proto_srcs
set(compiler_test_protos_files
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/cpp/test_bad_identifiers.proto
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/cpp/test_large_enum_value.proto
)
# //src/google/protobuf/compiler:test_plugin_srcs
set(test_plugin_files
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/test_plugin.cc
)
# //src/google/protobuf/io:test_srcs
set(io_test_files
${protobuf_SOURCE_DIR}/src/google/protobuf/io/coded_stream_unittest.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/io/io_win32_unittest.cc
@ -439,11 +814,19 @@ set(io_test_files
${protobuf_SOURCE_DIR}/src/google/protobuf/io/zero_copy_stream_unittest.cc
)
# //pkg:testinglib
set(testing_srcs
${protobuf_SOURCE_DIR}/src/google/protobuf/testing/file.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/testing/googletest.cc
)
# //pkg:testinglib
set(testing_hdrs
${protobuf_SOURCE_DIR}/src/google/protobuf/testing/file.h
${protobuf_SOURCE_DIR}/src/google/protobuf/testing/googletest.h
)
# //src/google/protobuf/util:test_srcs
set(util_test_files
${protobuf_SOURCE_DIR}/src/google/protobuf/util/delimited_message_util_test.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/util/field_comparator_test.cc
@ -460,6 +843,7 @@ set(util_test_files
${protobuf_SOURCE_DIR}/src/google/protobuf/util/type_resolver_util_test.cc
)
# //src/google/protobuf/util:test_proto_srcs
set(util_test_protos_files
${protobuf_SOURCE_DIR}/src/google/protobuf/util/internal/testdata/anys.proto
${protobuf_SOURCE_DIR}/src/google/protobuf/util/internal/testdata/books.proto
@ -477,6 +861,7 @@ set(util_test_protos_files
${protobuf_SOURCE_DIR}/src/google/protobuf/util/message_differencer_unittest.proto
)
# //src/google/protobuf/stubs:test_srcs
set(stubs_test_files
${protobuf_SOURCE_DIR}/src/google/protobuf/stubs/bytestream_unittest.cc
${protobuf_SOURCE_DIR}/src/google/protobuf/stubs/common_unittest.cc

@ -1,195 +1,8 @@
#!/bin/bash -u
# This script copies source file lists from src/Makefile.am to cmake files.
# This script generates file lists from Bazel, e.g., for cmake.
get_variable_value() {
local FILENAME=$1
local VARNAME=$2
awk "
BEGIN { start = 0; }
/^$VARNAME =/ { start = 1; }
{ if (start) { print \$0; } }
/\\\\\$/ { next; }
{ start = 0; }
" $FILENAME \
| sed "s/^$VARNAME =//" \
| sed "s/[ \\]//g" \
| grep -v "^\\$" \
| grep -v "^$" \
| LC_ALL=C sort | uniq
}
get_header_files() {
get_variable_value $@ | grep '\.h$'
}
get_source_files() {
get_variable_value $@ | grep "cc$\|inc$"
}
get_proto_files() {
get_variable_value $@ | grep "pb.cc$" | sed "s/pb.cc/proto/"
}
sort_files() {
for FILE in $@; do
echo $FILE
done | LC_ALL=C sort | uniq
}
MAKEFILE=src/Makefile.am
[ -f "$MAKEFILE" ] || {
echo "Cannot find: $MAKEFILE"
exit 1
}
# Extract file lists from src/Makefile.am
GZHEADERS=$(get_variable_value $MAKEFILE GZHEADERS)
LIBPROTOBUF_HEADERS=$(get_variable_value $MAKEFILE nobase_include_HEADERS | grep -v /compiler/)
LIBPROTOBUF_HEADERS=$(sort_files $GZHEADERS $LIBPROTOBUF_HEADERS)
LIBPROTOBUF_LITE_SOURCES=$(get_source_files $MAKEFILE libprotobuf_lite_la_SOURCES)
LIBPROTOBUF_SOURCES=$(get_source_files $MAKEFILE libprotobuf_la_SOURCES)
LIBPROTOC_SOURCES=$(get_source_files $MAKEFILE libprotoc_la_SOURCES)
LIBPROTOC_HEADERS=$(get_variable_value $MAKEFILE nobase_include_HEADERS | grep /compiler/)
LITE_PROTOS=$(get_proto_files $MAKEFILE protoc_lite_outputs)
PROTOS=$(get_proto_files $MAKEFILE protoc_outputs)
WKT_PROTOS=$(get_variable_value $MAKEFILE nobase_dist_proto_DATA)
COMMON_TEST_SOURCES=$(get_source_files $MAKEFILE COMMON_TEST_SOURCES)
COMMON_LITE_TEST_SOURCES=$(get_source_files $MAKEFILE COMMON_LITE_TEST_SOURCES)
TEST_SOURCES=$(get_source_files $MAKEFILE protobuf_test_SOURCES)
NON_MSVC_TEST_SOURCES=$(get_source_files $MAKEFILE NON_MSVC_TEST_SOURCES)
LITE_TEST_SOURCES=$(get_source_files $MAKEFILE protobuf_lite_test_SOURCES)
LITE_ARENA_TEST_SOURCES=$(get_source_files $MAKEFILE protobuf_lite_arena_test_SOURCES)
TEST_PLUGIN_SOURCES=$(get_source_files $MAKEFILE test_plugin_SOURCES)
################################################################################
# Update cmake files.
################################################################################
CMAKE_DIR=cmake
EXTRACT_INCLUDES_BAT=cmake/extract_includes.bat.in
[ -d "$CMAKE_DIR" ] || {
echo "Cannot find: $CMAKE_DIR"
exit 1
}
[ -f "$EXTRACT_INCLUDES_BAT" ] || {
echo "Cannot find: $EXTRACT_INCLUDES_BAT"
exit 1
}
set_cmake_value() {
local FILENAME=$1
local VARNAME=$2
local PREFIX=$3
shift
shift
shift
awk -v values="$*" -v prefix="$PREFIX" "
BEGIN { start = 0; }
/^set\\($VARNAME/ {
start = 1;
print \$0;
len = split(values, vlist, \" \");
for (i = 1; i <= len; ++i) {
printf(\" \");
if (vlist[i] !~ /^\\\$/) {
printf(\"%s\", prefix);
}
printf(\"%s\\n\", vlist[i]);
}
next;
}
start && /^\\)/ {
start = 0;
}
!start {
print \$0;
}
" $FILENAME > /tmp/$$
cp /tmp/$$ $FILENAME
}
# Replace file lists in cmake files.
CMAKE_PREFIX="\${protobuf_SOURCE_DIR}/src/"
set_cmake_value $CMAKE_DIR/libprotobuf-lite.cmake libprotobuf_lite_files $CMAKE_PREFIX $LIBPROTOBUF_LITE_SOURCES
set_cmake_value $CMAKE_DIR/libprotobuf.cmake libprotobuf_files $CMAKE_PREFIX $LIBPROTOBUF_SOURCES
set_cmake_value $CMAKE_DIR/libprotoc.cmake libprotoc_files $CMAKE_PREFIX $LIBPROTOC_SOURCES
set_cmake_value $CMAKE_DIR/libprotoc.cmake libprotoc_headers $CMAKE_PREFIX $LIBPROTOC_HEADERS
set_cmake_value $CMAKE_DIR/tests.cmake lite_test_protos "" $LITE_PROTOS
set_cmake_value $CMAKE_DIR/tests.cmake tests_protos "" $PROTOS
set_cmake_value $CMAKE_DIR/tests.cmake common_test_files $CMAKE_PREFIX '${common_lite_test_files}' $COMMON_TEST_SOURCES
set_cmake_value $CMAKE_DIR/tests.cmake common_lite_test_files $CMAKE_PREFIX $COMMON_LITE_TEST_SOURCES
set_cmake_value $CMAKE_DIR/tests.cmake tests_files $CMAKE_PREFIX $TEST_SOURCES
set_cmake_value $CMAKE_DIR/tests.cmake non_msvc_tests_files $CMAKE_PREFIX $NON_MSVC_TEST_SOURCES
set_cmake_value $CMAKE_DIR/tests.cmake lite_test_files $CMAKE_PREFIX $LITE_TEST_SOURCES
set_cmake_value $CMAKE_DIR/tests.cmake lite_arena_test_files $CMAKE_PREFIX $LITE_ARENA_TEST_SOURCES
# Generate extract_includes.bat
echo "mkdir include" > $EXTRACT_INCLUDES_BAT
for INCLUDE in $LIBPROTOBUF_HEADERS $LIBPROTOC_HEADERS $WKT_PROTOS; do
INCLUDE_DIR=$(dirname "$INCLUDE")
while [ ! "$INCLUDE_DIR" = "." ]; do
echo "mkdir include\\${INCLUDE_DIR//\//\\}"
INCLUDE_DIR=$(dirname "$INCLUDE_DIR")
done
done | sort | uniq >> $EXTRACT_INCLUDES_BAT
for INCLUDE in $(sort_files $LIBPROTOBUF_HEADERS $LIBPROTOC_HEADERS) $WKT_PROTOS; do
WINPATH=${INCLUDE//\//\\}
echo "copy \"\${PROTOBUF_SOURCE_WIN32_PATH}\\..\\src\\$WINPATH\" include\\$WINPATH" >> $EXTRACT_INCLUDES_BAT
done
################################################################################
# Update bazel BUILD files.
################################################################################
set_bazel_value() {
local FILENAME=$1
local VARNAME=$2
local PREFIX=$3
shift
shift
shift
awk -v values="$*" -v prefix="$PREFIX" "
BEGIN { start = 0; }
/# AUTOGEN\\($VARNAME\\)/ {
start = 1;
print \$0;
# replace \$0 with indent.
sub(/#.*/, \"\", \$0)
len = split(values, vlist, \" \");
for (i = 1; i <= len; ++i) {
printf(\"%s\\\"%s%s\\\",\n\", \$0, prefix, vlist[i]);
}
next;
}
start && /\]/ {
start = 0
}
!start {
print \$0;
}
" $FILENAME > /tmp/$$
cp /tmp/$$ $FILENAME
}
BAZEL_BUILD=./BUILD
BAZEL_PREFIX="src/"
if [ -f "$BAZEL_BUILD" ]; then
set_bazel_value $BAZEL_BUILD protobuf_lite_srcs $BAZEL_PREFIX $LIBPROTOBUF_LITE_SOURCES
set_bazel_value $BAZEL_BUILD protobuf_srcs $BAZEL_PREFIX $LIBPROTOBUF_SOURCES
set_bazel_value $BAZEL_BUILD protoc_lib_srcs $BAZEL_PREFIX $LIBPROTOC_SOURCES
set_bazel_value $BAZEL_BUILD lite_test_protos "" $LITE_PROTOS
set_bazel_value $BAZEL_BUILD well_known_protos "" $WKT_PROTOS
set_bazel_value $BAZEL_BUILD test_protos "" $PROTOS
set_bazel_value $BAZEL_BUILD common_test_srcs $BAZEL_PREFIX $COMMON_LITE_TEST_SOURCES $COMMON_TEST_SOURCES
set_bazel_value $BAZEL_BUILD test_srcs $BAZEL_PREFIX $TEST_SOURCES
set_bazel_value $BAZEL_BUILD non_msvc_test_srcs $BAZEL_PREFIX $NON_MSVC_TEST_SOURCES
set_bazel_value $BAZEL_BUILD test_plugin_srcs $BAZEL_PREFIX $TEST_PLUGIN_SOURCES
else
echo "Skipped BUILD file update."
fi
set -e
bazel build //pkg:gen_src_file_lists
cp -v bazel-bin/pkg/src_file_lists.cmake src/file_lists.cmake

Loading…
Cancel
Save