Jisi Liu | d19604f | 2015-06-17 17:37:58 -0700 | [diff] [blame] | 1 | # Bazel (http://bazel.io/) BUILD file for Protobuf. |
| 2 | |
| 3 | licenses(["notice"]) |
| 4 | |
| 5 | COPTS = [ |
| 6 | "-DHAVE_PTHREAD", |
| 7 | "-Wall", |
| 8 | "-Wwrite-strings", |
| 9 | "-Woverloaded-virtual", |
| 10 | "-Wno-sign-compare", |
| 11 | "-Wno-error=unused-function", |
| 12 | ] |
| 13 | |
| 14 | # Bazel should provide portable link_opts for pthread. |
| 15 | LINK_OPTS = ["-lpthread"] |
| 16 | |
| 17 | cc_library( |
| 18 | name = "protobuf_lite", |
| 19 | srcs = [ |
| 20 | # AUTOGEN(protobuf_lite_srcs) |
| 21 | "src/google/protobuf/arena.cc", |
| 22 | "src/google/protobuf/arenastring.cc", |
| 23 | "src/google/protobuf/extension_set.cc", |
| 24 | "src/google/protobuf/generated_message_util.cc", |
| 25 | "src/google/protobuf/io/coded_stream.cc", |
| 26 | "src/google/protobuf/io/zero_copy_stream.cc", |
| 27 | "src/google/protobuf/io/zero_copy_stream_impl_lite.cc", |
| 28 | "src/google/protobuf/message_lite.cc", |
| 29 | "src/google/protobuf/repeated_field.cc", |
| 30 | "src/google/protobuf/stubs/atomicops_internals_x86_gcc.cc", |
| 31 | "src/google/protobuf/stubs/atomicops_internals_x86_msvc.cc", |
Jisi Liu | af3eafd | 2015-06-18 13:38:36 -0700 | [diff] [blame^] | 32 | "src/google/protobuf/stubs/bytestream.cc", |
Jisi Liu | d19604f | 2015-06-17 17:37:58 -0700 | [diff] [blame] | 33 | "src/google/protobuf/stubs/common.cc", |
| 34 | "src/google/protobuf/stubs/once.cc", |
Jisi Liu | af3eafd | 2015-06-18 13:38:36 -0700 | [diff] [blame^] | 35 | "src/google/protobuf/stubs/status.cc", |
| 36 | "src/google/protobuf/stubs/statusor.cc", |
| 37 | "src/google/protobuf/stubs/stringpiece.cc", |
Jisi Liu | d19604f | 2015-06-17 17:37:58 -0700 | [diff] [blame] | 38 | "src/google/protobuf/stubs/stringprintf.cc", |
Jisi Liu | af3eafd | 2015-06-18 13:38:36 -0700 | [diff] [blame^] | 39 | "src/google/protobuf/stubs/strutil.cc", |
| 40 | "src/google/protobuf/stubs/time.cc", |
Jisi Liu | d19604f | 2015-06-17 17:37:58 -0700 | [diff] [blame] | 41 | "src/google/protobuf/wire_format_lite.cc", |
| 42 | ], |
| 43 | copts = COPTS, |
| 44 | includes = ["src/"], |
| 45 | linkopts = LINK_OPTS, |
| 46 | visibility = ["//visibility:public"], |
| 47 | ) |
| 48 | |
| 49 | cc_library( |
| 50 | name = "protobuf", |
| 51 | srcs = [ |
| 52 | # AUTOGEN(protobuf_srcs) |
| 53 | "src/google/protobuf/any.cc", |
| 54 | "src/google/protobuf/any.pb.cc", |
| 55 | "src/google/protobuf/api.pb.cc", |
| 56 | "src/google/protobuf/compiler/importer.cc", |
| 57 | "src/google/protobuf/compiler/parser.cc", |
| 58 | "src/google/protobuf/descriptor.cc", |
| 59 | "src/google/protobuf/descriptor.pb.cc", |
| 60 | "src/google/protobuf/descriptor_database.cc", |
| 61 | "src/google/protobuf/duration.pb.cc", |
| 62 | "src/google/protobuf/dynamic_message.cc", |
| 63 | "src/google/protobuf/empty.pb.cc", |
| 64 | "src/google/protobuf/extension_set_heavy.cc", |
| 65 | "src/google/protobuf/field_mask.pb.cc", |
| 66 | "src/google/protobuf/generated_message_reflection.cc", |
| 67 | "src/google/protobuf/io/gzip_stream.cc", |
| 68 | "src/google/protobuf/io/printer.cc", |
| 69 | "src/google/protobuf/io/strtod.cc", |
| 70 | "src/google/protobuf/io/tokenizer.cc", |
| 71 | "src/google/protobuf/io/zero_copy_stream_impl.cc", |
| 72 | "src/google/protobuf/map_field.cc", |
| 73 | "src/google/protobuf/message.cc", |
| 74 | "src/google/protobuf/reflection_ops.cc", |
| 75 | "src/google/protobuf/service.cc", |
| 76 | "src/google/protobuf/source_context.pb.cc", |
| 77 | "src/google/protobuf/struct.pb.cc", |
Jisi Liu | af3eafd | 2015-06-18 13:38:36 -0700 | [diff] [blame^] | 78 | "src/google/protobuf/stubs/mathlimits.cc", |
Jisi Liu | d19604f | 2015-06-17 17:37:58 -0700 | [diff] [blame] | 79 | "src/google/protobuf/stubs/structurally_valid.cc", |
Jisi Liu | d19604f | 2015-06-17 17:37:58 -0700 | [diff] [blame] | 80 | "src/google/protobuf/stubs/substitute.cc", |
| 81 | "src/google/protobuf/text_format.cc", |
| 82 | "src/google/protobuf/timestamp.pb.cc", |
| 83 | "src/google/protobuf/type.pb.cc", |
| 84 | "src/google/protobuf/unknown_field_set.cc", |
Jisi Liu | af3eafd | 2015-06-18 13:38:36 -0700 | [diff] [blame^] | 85 | "src/google/protobuf/util/field_comparator.cc", |
| 86 | "src/google/protobuf/util/internal/datapiece.cc", |
| 87 | "src/google/protobuf/util/internal/default_value_objectwriter.cc", |
| 88 | "src/google/protobuf/util/internal/error_listener.cc", |
| 89 | "src/google/protobuf/util/internal/field_mask_utility.cc", |
| 90 | "src/google/protobuf/util/internal/json_escaping.cc", |
| 91 | "src/google/protobuf/util/internal/json_objectwriter.cc", |
| 92 | "src/google/protobuf/util/internal/json_stream_parser.cc", |
| 93 | "src/google/protobuf/util/internal/object_writer.cc", |
| 94 | "src/google/protobuf/util/internal/protostream_objectsource.cc", |
| 95 | "src/google/protobuf/util/internal/protostream_objectwriter.cc", |
| 96 | "src/google/protobuf/util/internal/type_info.cc", |
| 97 | "src/google/protobuf/util/internal/type_info_test_helper.cc", |
| 98 | "src/google/protobuf/util/internal/utility.cc", |
| 99 | "src/google/protobuf/util/json_util.cc", |
| 100 | "src/google/protobuf/util/message_differencer.cc", |
| 101 | "src/google/protobuf/util/type_resolver_util.cc", |
Jisi Liu | d19604f | 2015-06-17 17:37:58 -0700 | [diff] [blame] | 102 | "src/google/protobuf/wire_format.cc", |
| 103 | "src/google/protobuf/wrappers.pb.cc", |
| 104 | ], |
| 105 | copts = COPTS, |
| 106 | includes = ["src/"], |
| 107 | linkopts = LINK_OPTS, |
| 108 | visibility = ["//visibility:public"], |
| 109 | deps = [":protobuf_lite"], |
| 110 | ) |
| 111 | |
| 112 | cc_library( |
| 113 | name = "protoc_lib", |
| 114 | srcs = [ |
| 115 | # AUTOGEN(protoc_lib_srcs) |
| 116 | "src/google/protobuf/compiler/code_generator.cc", |
| 117 | "src/google/protobuf/compiler/command_line_interface.cc", |
| 118 | "src/google/protobuf/compiler/cpp/cpp_enum.cc", |
| 119 | "src/google/protobuf/compiler/cpp/cpp_enum_field.cc", |
| 120 | "src/google/protobuf/compiler/cpp/cpp_extension.cc", |
| 121 | "src/google/protobuf/compiler/cpp/cpp_field.cc", |
| 122 | "src/google/protobuf/compiler/cpp/cpp_file.cc", |
| 123 | "src/google/protobuf/compiler/cpp/cpp_generator.cc", |
| 124 | "src/google/protobuf/compiler/cpp/cpp_helpers.cc", |
| 125 | "src/google/protobuf/compiler/cpp/cpp_map_field.cc", |
| 126 | "src/google/protobuf/compiler/cpp/cpp_message.cc", |
| 127 | "src/google/protobuf/compiler/cpp/cpp_message_field.cc", |
| 128 | "src/google/protobuf/compiler/cpp/cpp_primitive_field.cc", |
| 129 | "src/google/protobuf/compiler/cpp/cpp_service.cc", |
| 130 | "src/google/protobuf/compiler/cpp/cpp_string_field.cc", |
| 131 | "src/google/protobuf/compiler/csharp/csharp_enum.cc", |
| 132 | "src/google/protobuf/compiler/csharp/csharp_enum_field.cc", |
| 133 | "src/google/protobuf/compiler/csharp/csharp_extension.cc", |
| 134 | "src/google/protobuf/compiler/csharp/csharp_field_base.cc", |
| 135 | "src/google/protobuf/compiler/csharp/csharp_generator.cc", |
| 136 | "src/google/protobuf/compiler/csharp/csharp_helpers.cc", |
| 137 | "src/google/protobuf/compiler/csharp/csharp_message.cc", |
| 138 | "src/google/protobuf/compiler/csharp/csharp_message_field.cc", |
| 139 | "src/google/protobuf/compiler/csharp/csharp_primitive_field.cc", |
| 140 | "src/google/protobuf/compiler/csharp/csharp_repeated_enum_field.cc", |
| 141 | "src/google/protobuf/compiler/csharp/csharp_repeated_message_field.cc", |
| 142 | "src/google/protobuf/compiler/csharp/csharp_repeated_primitive_field.cc", |
| 143 | "src/google/protobuf/compiler/csharp/csharp_source_generator_base.cc", |
| 144 | "src/google/protobuf/compiler/csharp/csharp_umbrella_class.cc", |
| 145 | "src/google/protobuf/compiler/csharp/csharp_writer.cc", |
| 146 | "src/google/protobuf/compiler/java/java_context.cc", |
| 147 | "src/google/protobuf/compiler/java/java_doc_comment.cc", |
| 148 | "src/google/protobuf/compiler/java/java_enum.cc", |
| 149 | "src/google/protobuf/compiler/java/java_enum_field.cc", |
| 150 | "src/google/protobuf/compiler/java/java_enum_field_lite.cc", |
| 151 | "src/google/protobuf/compiler/java/java_extension.cc", |
| 152 | "src/google/protobuf/compiler/java/java_field.cc", |
| 153 | "src/google/protobuf/compiler/java/java_file.cc", |
| 154 | "src/google/protobuf/compiler/java/java_generator.cc", |
| 155 | "src/google/protobuf/compiler/java/java_generator_factory.cc", |
| 156 | "src/google/protobuf/compiler/java/java_helpers.cc", |
| 157 | "src/google/protobuf/compiler/java/java_lazy_message_field.cc", |
| 158 | "src/google/protobuf/compiler/java/java_lazy_message_field_lite.cc", |
| 159 | "src/google/protobuf/compiler/java/java_map_field.cc", |
| 160 | "src/google/protobuf/compiler/java/java_map_field_lite.cc", |
| 161 | "src/google/protobuf/compiler/java/java_message.cc", |
| 162 | "src/google/protobuf/compiler/java/java_message_builder.cc", |
| 163 | "src/google/protobuf/compiler/java/java_message_builder_lite.cc", |
| 164 | "src/google/protobuf/compiler/java/java_message_field.cc", |
| 165 | "src/google/protobuf/compiler/java/java_message_field_lite.cc", |
| 166 | "src/google/protobuf/compiler/java/java_message_lite.cc", |
| 167 | "src/google/protobuf/compiler/java/java_name_resolver.cc", |
| 168 | "src/google/protobuf/compiler/java/java_primitive_field.cc", |
| 169 | "src/google/protobuf/compiler/java/java_primitive_field_lite.cc", |
| 170 | "src/google/protobuf/compiler/java/java_service.cc", |
| 171 | "src/google/protobuf/compiler/java/java_shared_code_generator.cc", |
| 172 | "src/google/protobuf/compiler/java/java_string_field.cc", |
| 173 | "src/google/protobuf/compiler/java/java_string_field_lite.cc", |
| 174 | "src/google/protobuf/compiler/javanano/javanano_enum.cc", |
| 175 | "src/google/protobuf/compiler/javanano/javanano_enum_field.cc", |
| 176 | "src/google/protobuf/compiler/javanano/javanano_extension.cc", |
| 177 | "src/google/protobuf/compiler/javanano/javanano_field.cc", |
| 178 | "src/google/protobuf/compiler/javanano/javanano_file.cc", |
| 179 | "src/google/protobuf/compiler/javanano/javanano_generator.cc", |
| 180 | "src/google/protobuf/compiler/javanano/javanano_helpers.cc", |
| 181 | "src/google/protobuf/compiler/javanano/javanano_map_field.cc", |
| 182 | "src/google/protobuf/compiler/javanano/javanano_message.cc", |
| 183 | "src/google/protobuf/compiler/javanano/javanano_message_field.cc", |
| 184 | "src/google/protobuf/compiler/javanano/javanano_primitive_field.cc", |
| 185 | "src/google/protobuf/compiler/objectivec/objectivec_enum.cc", |
| 186 | "src/google/protobuf/compiler/objectivec/objectivec_enum_field.cc", |
| 187 | "src/google/protobuf/compiler/objectivec/objectivec_extension.cc", |
| 188 | "src/google/protobuf/compiler/objectivec/objectivec_field.cc", |
| 189 | "src/google/protobuf/compiler/objectivec/objectivec_file.cc", |
| 190 | "src/google/protobuf/compiler/objectivec/objectivec_generator.cc", |
| 191 | "src/google/protobuf/compiler/objectivec/objectivec_helpers.cc", |
| 192 | "src/google/protobuf/compiler/objectivec/objectivec_map_field.cc", |
| 193 | "src/google/protobuf/compiler/objectivec/objectivec_message.cc", |
| 194 | "src/google/protobuf/compiler/objectivec/objectivec_message_field.cc", |
| 195 | "src/google/protobuf/compiler/objectivec/objectivec_oneof.cc", |
| 196 | "src/google/protobuf/compiler/objectivec/objectivec_primitive_field.cc", |
| 197 | "src/google/protobuf/compiler/plugin.cc", |
| 198 | "src/google/protobuf/compiler/plugin.pb.cc", |
| 199 | "src/google/protobuf/compiler/python/python_generator.cc", |
| 200 | "src/google/protobuf/compiler/ruby/ruby_generator.cc", |
| 201 | "src/google/protobuf/compiler/subprocess.cc", |
| 202 | "src/google/protobuf/compiler/zip_writer.cc", |
| 203 | ], |
| 204 | copts = COPTS, |
| 205 | includes = ["src/"], |
| 206 | linkopts = LINK_OPTS, |
| 207 | visibility = ["//visibility:public"], |
| 208 | deps = [":protobuf"], |
| 209 | ) |
| 210 | |
| 211 | cc_binary( |
| 212 | name = "protoc", |
| 213 | srcs = ["src/google/protobuf/compiler/main.cc"], |
Jisi Liu | d19604f | 2015-06-17 17:37:58 -0700 | [diff] [blame] | 214 | linkopts = LINK_OPTS, |
| 215 | visibility = ["//visibility:public"], |
| 216 | deps = [":protoc_lib"], |
| 217 | ) |
| 218 | |
| 219 | WELL_KNOWN_PROTOS = [ |
| 220 | # AUTOGEN(well_known_protos) |
| 221 | "google/protobuf/any.proto", |
| 222 | "google/protobuf/api.proto", |
| 223 | "google/protobuf/compiler/plugin.proto", |
| 224 | "google/protobuf/descriptor.proto", |
| 225 | "google/protobuf/duration.proto", |
| 226 | "google/protobuf/empty.proto", |
| 227 | "google/protobuf/field_mask.proto", |
| 228 | "google/protobuf/source_context.proto", |
| 229 | "google/protobuf/struct.proto", |
| 230 | "google/protobuf/timestamp.proto", |
| 231 | "google/protobuf/type.proto", |
| 232 | "google/protobuf/wrappers.proto", |
| 233 | ] |
| 234 | |
| 235 | ################################################################################ |
| 236 | # Tests |
| 237 | ################################################################################ |
| 238 | |
| 239 | LITE_TEST_PROTOS = [ |
| 240 | # AUTOGEN(lite_test_protos) |
| 241 | "google/protobuf/map_lite_unittest.proto", |
| 242 | "google/protobuf/unittest_import_lite.proto", |
| 243 | "google/protobuf/unittest_import_public_lite.proto", |
| 244 | "google/protobuf/unittest_lite.proto", |
| 245 | ] |
| 246 | |
| 247 | LITE_TEST_PROTOS_OUTS = [ |
| 248 | # AUTOGEN(lite_test_protos_outs) |
| 249 | "src/google/protobuf/map_lite_unittest.pb.cc", |
| 250 | "src/google/protobuf/map_lite_unittest.pb.h", |
| 251 | "src/google/protobuf/unittest_import_lite.pb.cc", |
| 252 | "src/google/protobuf/unittest_import_lite.pb.h", |
| 253 | "src/google/protobuf/unittest_import_public_lite.pb.cc", |
| 254 | "src/google/protobuf/unittest_import_public_lite.pb.h", |
| 255 | "src/google/protobuf/unittest_lite.pb.cc", |
| 256 | "src/google/protobuf/unittest_lite.pb.h", |
| 257 | ] |
| 258 | |
| 259 | TEST_PROTOS = [ |
| 260 | # AUTOGEN(test_protos) |
| 261 | "google/protobuf/any_test.proto", |
| 262 | "google/protobuf/compiler/cpp/cpp_test_bad_identifiers.proto", |
| 263 | "google/protobuf/compiler/cpp/cpp_test_large_enum_value.proto", |
| 264 | "google/protobuf/map_proto2_unittest.proto", |
| 265 | "google/protobuf/map_unittest.proto", |
| 266 | "google/protobuf/unittest.proto", |
| 267 | "google/protobuf/unittest_arena.proto", |
| 268 | "google/protobuf/unittest_custom_options.proto", |
| 269 | "google/protobuf/unittest_drop_unknown_fields.proto", |
| 270 | "google/protobuf/unittest_embed_optimize_for.proto", |
| 271 | "google/protobuf/unittest_empty.proto", |
| 272 | "google/protobuf/unittest_enormous_descriptor.proto", |
| 273 | "google/protobuf/unittest_import.proto", |
| 274 | "google/protobuf/unittest_import_public.proto", |
| 275 | "google/protobuf/unittest_lite_imports_nonlite.proto", |
| 276 | "google/protobuf/unittest_mset.proto", |
| 277 | "google/protobuf/unittest_no_arena.proto", |
| 278 | "google/protobuf/unittest_no_arena_import.proto", |
| 279 | "google/protobuf/unittest_no_field_presence.proto", |
| 280 | "google/protobuf/unittest_no_generic_services.proto", |
| 281 | "google/protobuf/unittest_optimize_for.proto", |
| 282 | "google/protobuf/unittest_preserve_unknown_enum.proto", |
| 283 | "google/protobuf/unittest_preserve_unknown_enum2.proto", |
| 284 | "google/protobuf/unittest_proto3_arena.proto", |
| 285 | "google/protobuf/unittest_well_known_types.proto", |
Jisi Liu | af3eafd | 2015-06-18 13:38:36 -0700 | [diff] [blame^] | 286 | "google/protobuf/util/internal/testdata/anys.proto", |
| 287 | "google/protobuf/util/internal/testdata/books.proto", |
| 288 | "google/protobuf/util/internal/testdata/default_value.proto", |
| 289 | "google/protobuf/util/internal/testdata/default_value_test.proto", |
| 290 | "google/protobuf/util/internal/testdata/field_mask.proto", |
| 291 | "google/protobuf/util/internal/testdata/maps.proto", |
| 292 | "google/protobuf/util/internal/testdata/struct.proto", |
| 293 | "google/protobuf/util/internal/testdata/timestamp_duration.proto", |
| 294 | "google/protobuf/util/json_format_proto3.proto", |
Jisi Liu | d19604f | 2015-06-17 17:37:58 -0700 | [diff] [blame] | 295 | ] |
| 296 | |
| 297 | TEST_PROTOS_OUTS = [ |
| 298 | # AUTOGEN(test_protos_outs) |
| 299 | "src/google/protobuf/any_test.pb.cc", |
| 300 | "src/google/protobuf/any_test.pb.h", |
| 301 | "src/google/protobuf/compiler/cpp/cpp_test_bad_identifiers.pb.cc", |
| 302 | "src/google/protobuf/compiler/cpp/cpp_test_bad_identifiers.pb.h", |
| 303 | "src/google/protobuf/compiler/cpp/cpp_test_large_enum_value.pb.cc", |
| 304 | "src/google/protobuf/compiler/cpp/cpp_test_large_enum_value.pb.h", |
| 305 | "src/google/protobuf/map_proto2_unittest.pb.cc", |
| 306 | "src/google/protobuf/map_proto2_unittest.pb.h", |
| 307 | "src/google/protobuf/map_unittest.pb.cc", |
| 308 | "src/google/protobuf/map_unittest.pb.h", |
| 309 | "src/google/protobuf/unittest.pb.cc", |
| 310 | "src/google/protobuf/unittest.pb.h", |
| 311 | "src/google/protobuf/unittest_arena.pb.cc", |
| 312 | "src/google/protobuf/unittest_arena.pb.h", |
| 313 | "src/google/protobuf/unittest_custom_options.pb.cc", |
| 314 | "src/google/protobuf/unittest_custom_options.pb.h", |
| 315 | "src/google/protobuf/unittest_drop_unknown_fields.pb.cc", |
| 316 | "src/google/protobuf/unittest_drop_unknown_fields.pb.h", |
| 317 | "src/google/protobuf/unittest_embed_optimize_for.pb.cc", |
| 318 | "src/google/protobuf/unittest_embed_optimize_for.pb.h", |
| 319 | "src/google/protobuf/unittest_empty.pb.cc", |
| 320 | "src/google/protobuf/unittest_empty.pb.h", |
| 321 | "src/google/protobuf/unittest_enormous_descriptor.pb.cc", |
| 322 | "src/google/protobuf/unittest_enormous_descriptor.pb.h", |
| 323 | "src/google/protobuf/unittest_import.pb.cc", |
| 324 | "src/google/protobuf/unittest_import.pb.h", |
| 325 | "src/google/protobuf/unittest_import_public.pb.cc", |
| 326 | "src/google/protobuf/unittest_import_public.pb.h", |
| 327 | "src/google/protobuf/unittest_lite_imports_nonlite.pb.cc", |
| 328 | "src/google/protobuf/unittest_lite_imports_nonlite.pb.h", |
| 329 | "src/google/protobuf/unittest_mset.pb.cc", |
| 330 | "src/google/protobuf/unittest_mset.pb.h", |
| 331 | "src/google/protobuf/unittest_no_arena.pb.cc", |
| 332 | "src/google/protobuf/unittest_no_arena.pb.h", |
| 333 | "src/google/protobuf/unittest_no_arena_import.pb.cc", |
| 334 | "src/google/protobuf/unittest_no_arena_import.pb.h", |
| 335 | "src/google/protobuf/unittest_no_field_presence.pb.cc", |
| 336 | "src/google/protobuf/unittest_no_field_presence.pb.h", |
| 337 | "src/google/protobuf/unittest_no_generic_services.pb.cc", |
| 338 | "src/google/protobuf/unittest_no_generic_services.pb.h", |
| 339 | "src/google/protobuf/unittest_optimize_for.pb.cc", |
| 340 | "src/google/protobuf/unittest_optimize_for.pb.h", |
| 341 | "src/google/protobuf/unittest_preserve_unknown_enum.pb.cc", |
| 342 | "src/google/protobuf/unittest_preserve_unknown_enum.pb.h", |
| 343 | "src/google/protobuf/unittest_preserve_unknown_enum2.pb.cc", |
| 344 | "src/google/protobuf/unittest_preserve_unknown_enum2.pb.h", |
| 345 | "src/google/protobuf/unittest_proto3_arena.pb.cc", |
| 346 | "src/google/protobuf/unittest_proto3_arena.pb.h", |
| 347 | "src/google/protobuf/unittest_well_known_types.pb.cc", |
| 348 | "src/google/protobuf/unittest_well_known_types.pb.h", |
Jisi Liu | af3eafd | 2015-06-18 13:38:36 -0700 | [diff] [blame^] | 349 | "src/google/protobuf/util/internal/testdata/anys.pb.cc", |
| 350 | "src/google/protobuf/util/internal/testdata/anys.pb.h", |
| 351 | "src/google/protobuf/util/internal/testdata/books.pb.cc", |
| 352 | "src/google/protobuf/util/internal/testdata/books.pb.h", |
| 353 | "src/google/protobuf/util/internal/testdata/default_value.pb.cc", |
| 354 | "src/google/protobuf/util/internal/testdata/default_value.pb.h", |
| 355 | "src/google/protobuf/util/internal/testdata/default_value_test.pb.cc", |
| 356 | "src/google/protobuf/util/internal/testdata/default_value_test.pb.h", |
| 357 | "src/google/protobuf/util/internal/testdata/field_mask.pb.cc", |
| 358 | "src/google/protobuf/util/internal/testdata/field_mask.pb.h", |
| 359 | "src/google/protobuf/util/internal/testdata/maps.pb.cc", |
| 360 | "src/google/protobuf/util/internal/testdata/maps.pb.h", |
| 361 | "src/google/protobuf/util/internal/testdata/struct.pb.cc", |
| 362 | "src/google/protobuf/util/internal/testdata/struct.pb.h", |
| 363 | "src/google/protobuf/util/internal/testdata/timestamp_duration.pb.cc", |
| 364 | "src/google/protobuf/util/internal/testdata/timestamp_duration.pb.h", |
| 365 | "src/google/protobuf/util/json_format_proto3.pb.cc", |
| 366 | "src/google/protobuf/util/json_format_proto3.pb.h", |
Jisi Liu | d19604f | 2015-06-17 17:37:58 -0700 | [diff] [blame] | 367 | ] |
| 368 | |
| 369 | PROTOS = LITE_TEST_PROTOS + TEST_PROTOS |
| 370 | |
| 371 | INPUTS = PROTOS + WELL_KNOWN_PROTOS |
| 372 | |
| 373 | OUTPUTS = LITE_TEST_PROTOS_OUTS + TEST_PROTOS_OUTS |
| 374 | |
| 375 | genrule( |
| 376 | name = "gen_test_protos", |
| 377 | srcs = ["src/" + x for x in INPUTS], |
| 378 | outs = OUTPUTS, |
| 379 | cmd = |
| 380 | "$(location :protoc) --cpp_out=$(@D)/src" + |
| 381 | "".join([" -I" + x + "=$(location src/" + x + ")" for x in INPUTS]) + |
| 382 | "".join([" $(location src/" + x + ")" for x in PROTOS]), |
| 383 | tools = [":protoc"], |
| 384 | ) |
| 385 | |
| 386 | COMMON_TEST_SRCS = [ |
| 387 | # AUTOGEN(common_test_srcs) |
| 388 | "src/google/protobuf/arena_test_util.cc", |
| 389 | "src/google/protobuf/map_test_util.cc", |
| 390 | "src/google/protobuf/test_util.cc", |
| 391 | "src/google/protobuf/testing/file.cc", |
| 392 | "src/google/protobuf/testing/googletest.cc", |
| 393 | ] |
| 394 | |
| 395 | # TODO(liujisi): Add gtest dependency and enable tests. |
| 396 | # cc_test( |
| 397 | # name = "protobuf_test", |
| 398 | # srcs = OUTPUTS + COMMON_TEST_SRCS + [ |
Jisi Liu | d19604f | 2015-06-17 17:37:58 -0700 | [diff] [blame] | 399 | # "src/google/protobuf/any_test.cc", |
| 400 | # "src/google/protobuf/arena_unittest.cc", |
| 401 | # "src/google/protobuf/arenastring_unittest.cc", |
| 402 | # "src/google/protobuf/compiler/command_line_interface_unittest.cc", |
| 403 | # "src/google/protobuf/compiler/cpp/cpp_bootstrap_unittest.cc", |
| 404 | # "src/google/protobuf/compiler/cpp/cpp_plugin_unittest.cc", |
| 405 | # "src/google/protobuf/compiler/cpp/cpp_unittest.cc", |
| 406 | # "src/google/protobuf/compiler/csharp/csharp_generator_unittest.cc", |
| 407 | # "src/google/protobuf/compiler/importer_unittest.cc", |
| 408 | # "src/google/protobuf/compiler/java/java_doc_comment_unittest.cc", |
| 409 | # "src/google/protobuf/compiler/java/java_plugin_unittest.cc", |
| 410 | # "src/google/protobuf/compiler/mock_code_generator.cc", |
| 411 | # "src/google/protobuf/compiler/objectivec/objectivec_helpers_unittest.cc", |
| 412 | # "src/google/protobuf/compiler/parser_unittest.cc", |
| 413 | # "src/google/protobuf/compiler/python/python_plugin_unittest.cc", |
| 414 | # "src/google/protobuf/compiler/ruby/ruby_generator_unittest.cc", |
| 415 | # "src/google/protobuf/descriptor_database_unittest.cc", |
| 416 | # "src/google/protobuf/descriptor_unittest.cc", |
| 417 | # "src/google/protobuf/drop_unknown_fields_test.cc", |
| 418 | # "src/google/protobuf/dynamic_message_unittest.cc", |
| 419 | # "src/google/protobuf/extension_set_unittest.cc", |
| 420 | # "src/google/protobuf/generated_message_reflection_unittest.cc", |
| 421 | # "src/google/protobuf/io/coded_stream_unittest.cc", |
| 422 | # "src/google/protobuf/io/printer_unittest.cc", |
| 423 | # "src/google/protobuf/io/tokenizer_unittest.cc", |
| 424 | # "src/google/protobuf/io/zero_copy_stream_unittest.cc", |
| 425 | # "src/google/protobuf/map_field_test.cc", |
| 426 | # "src/google/protobuf/map_test.cc", |
| 427 | # "src/google/protobuf/message_unittest.cc", |
| 428 | # "src/google/protobuf/no_field_presence_test.cc", |
| 429 | # "src/google/protobuf/preserve_unknown_enum_test.cc", |
| 430 | # "src/google/protobuf/proto3_arena_unittest.cc", |
| 431 | # "src/google/protobuf/reflection_ops_unittest.cc", |
| 432 | # "src/google/protobuf/repeated_field_reflection_unittest.cc", |
| 433 | # "src/google/protobuf/repeated_field_unittest.cc", |
Jisi Liu | af3eafd | 2015-06-18 13:38:36 -0700 | [diff] [blame^] | 434 | # "src/google/protobuf/stubs/bytestream_unittest.cc", |
Jisi Liu | d19604f | 2015-06-17 17:37:58 -0700 | [diff] [blame] | 435 | # "src/google/protobuf/stubs/common_unittest.cc", |
| 436 | # "src/google/protobuf/stubs/once_unittest.cc", |
Jisi Liu | af3eafd | 2015-06-18 13:38:36 -0700 | [diff] [blame^] | 437 | # "src/google/protobuf/stubs/status_test.cc", |
| 438 | # "src/google/protobuf/stubs/statusor_test.cc", |
| 439 | # "src/google/protobuf/stubs/stringpiece_unittest.cc", |
Jisi Liu | d19604f | 2015-06-17 17:37:58 -0700 | [diff] [blame] | 440 | # "src/google/protobuf/stubs/stringprintf_unittest.cc", |
| 441 | # "src/google/protobuf/stubs/structurally_valid_unittest.cc", |
| 442 | # "src/google/protobuf/stubs/strutil_unittest.cc", |
| 443 | # "src/google/protobuf/stubs/template_util_unittest.cc", |
Jisi Liu | af3eafd | 2015-06-18 13:38:36 -0700 | [diff] [blame^] | 444 | # "src/google/protobuf/stubs/time_test.cc", |
Jisi Liu | d19604f | 2015-06-17 17:37:58 -0700 | [diff] [blame] | 445 | # "src/google/protobuf/stubs/type_traits_unittest.cc", |
| 446 | # "src/google/protobuf/text_format_unittest.cc", |
| 447 | # "src/google/protobuf/unknown_field_set_unittest.cc", |
Jisi Liu | af3eafd | 2015-06-18 13:38:36 -0700 | [diff] [blame^] | 448 | # "src/google/protobuf/util/field_comparator_test.cc", |
| 449 | # "src/google/protobuf/util/internal/default_value_objectwriter_test.cc", |
| 450 | # "src/google/protobuf/util/internal/json_objectwriter_test.cc", |
| 451 | # "src/google/protobuf/util/internal/json_stream_parser_test.cc", |
| 452 | # "src/google/protobuf/util/internal/protostream_objectsource_test.cc", |
| 453 | # "src/google/protobuf/util/internal/protostream_objectwriter_test.cc", |
| 454 | # "src/google/protobuf/util/internal/type_info_test_helper.cc", |
| 455 | # "src/google/protobuf/util/json_util_test.cc", |
| 456 | # "src/google/protobuf/util/type_resolver_util_test.cc", |
Jisi Liu | d19604f | 2015-06-17 17:37:58 -0700 | [diff] [blame] | 457 | # "src/google/protobuf/well_known_types_unittest.cc", |
| 458 | # "src/google/protobuf/wire_format_unittest.cc", |
| 459 | # ], |
| 460 | # copts = COPTS, |
| 461 | # includes = [ |
| 462 | # "src/", |
| 463 | # ], |
| 464 | # linkopts = LINK_OPTS, |
| 465 | # deps = [ |
| 466 | # ":protobuf", |
| 467 | # ":protoc_lib", |
| 468 | # ], |
| 469 | # ) |