mirror of https://github.com/grpc/grpc.git
parent
6114760312
commit
bd5ed4fddd
10 changed files with 180 additions and 119 deletions
@ -0,0 +1,120 @@ |
||||
# gRPC Bazel BUILD file. |
||||
# |
||||
# Copyright 2016 gRPC authors. |
||||
# |
||||
# Licensed under the Apache License, Version 2.0 (the "License"); |
||||
# you may not use this file except in compliance with the License. |
||||
# You may obtain a copy of the License at |
||||
# |
||||
# http://www.apache.org/licenses/LICENSE-2.0 |
||||
# |
||||
# Unless required by applicable law or agreed to in writing, software |
||||
# distributed under the License is distributed on an "AS IS" BASIS, |
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
# See the License for the specific language governing permissions and |
||||
# limitations under the License. |
||||
|
||||
licenses(["notice"]) # Apache v2 |
||||
|
||||
exports_files(["LICENSE"]) |
||||
|
||||
package( |
||||
default_visibility = ["//visibility:public"], |
||||
features = [ |
||||
"-layering_check", |
||||
"-parse_headers", |
||||
], |
||||
) |
||||
|
||||
load( |
||||
"//bazel:grpc_build_system.bzl", |
||||
"grpc_cc_library", |
||||
"grpc_proto_plugin", |
||||
) |
||||
|
||||
grpc_cc_library( |
||||
name = "grpc_plugin_support", |
||||
srcs = [ |
||||
"cpp_generator.cc", |
||||
"csharp_generator.cc", |
||||
"node_generator.cc", |
||||
"objective_c_generator.cc", |
||||
"php_generator.cc", |
||||
"python_generator.cc", |
||||
"ruby_generator.cc", |
||||
], |
||||
hdrs = [ |
||||
"config_protobuf.h", |
||||
"config.h", |
||||
"cpp_generator.h", |
||||
"cpp_generator_helpers.h", |
||||
"cpp_plugin.h", |
||||
"csharp_generator.h", |
||||
"csharp_generator_helpers.h", |
||||
"generator_helpers.h", |
||||
"node_generator.h", |
||||
"node_generator_helpers.h", |
||||
"objective_c_generator.h", |
||||
"objective_c_generator_helpers.h", |
||||
"php_generator.h", |
||||
"php_generator_helpers.h", |
||||
"protobuf_plugin.h", |
||||
"python_generator.h", |
||||
"python_generator_helpers.h", |
||||
"python_private_generator.h", |
||||
"ruby_generator.h", |
||||
"ruby_generator_helpers-inl.h", |
||||
"ruby_generator_map-inl.h", |
||||
"ruby_generator_string-inl.h", |
||||
"schema_interface.h", |
||||
], |
||||
external_deps = [ |
||||
"protobuf_clib", |
||||
], |
||||
language = "c++", |
||||
deps = [ |
||||
"//:grpc++_config_proto", |
||||
], |
||||
) |
||||
|
||||
grpc_proto_plugin( |
||||
name = "grpc_cpp_plugin", |
||||
srcs = ["cpp_plugin.cc"], |
||||
deps = [":grpc_plugin_support"], |
||||
) |
||||
|
||||
grpc_proto_plugin( |
||||
name = "grpc_csharp_plugin", |
||||
srcs = ["csharp_plugin.cc"], |
||||
deps = [":grpc_plugin_support"], |
||||
) |
||||
|
||||
grpc_proto_plugin( |
||||
name = "grpc_node_plugin", |
||||
srcs = ["node_plugin.cc"], |
||||
deps = [":grpc_plugin_support"], |
||||
) |
||||
|
||||
grpc_proto_plugin( |
||||
name = "grpc_objective_c_plugin", |
||||
srcs = ["objective_c_plugin.cc"], |
||||
deps = [":grpc_plugin_support"], |
||||
) |
||||
|
||||
grpc_proto_plugin( |
||||
name = "grpc_php_plugin", |
||||
srcs = ["php_plugin.cc"], |
||||
deps = [":grpc_plugin_support"], |
||||
) |
||||
|
||||
grpc_proto_plugin( |
||||
name = "grpc_python_plugin", |
||||
srcs = ["python_plugin.cc"], |
||||
deps = [":grpc_plugin_support"], |
||||
) |
||||
|
||||
grpc_proto_plugin( |
||||
name = "grpc_ruby_plugin", |
||||
srcs = ["ruby_plugin.cc"], |
||||
deps = [":grpc_plugin_support"], |
||||
) |
@ -0,0 +1,52 @@ |
||||
/*
|
||||
* |
||||
* Copyright 2019 gRPC authors. |
||||
* |
||||
* Licensed under the Apache License, Version 2.0 (the "License"); |
||||
* you may not use this file except in compliance with the License. |
||||
* You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
* |
||||
*/ |
||||
|
||||
#ifndef SRC_COMPILER_CONFIG_PROTOBUF_H |
||||
#define SRC_COMPILER_CONFIG_PROTOBUF_H |
||||
|
||||
#include <grpcpp/impl/codegen/config_protobuf.h> |
||||
|
||||
#ifndef GRPC_CUSTOM_CODEGENERATOR |
||||
#include <google/protobuf/compiler/code_generator.h> |
||||
#define GRPC_CUSTOM_CODEGENERATOR ::google::protobuf::compiler::CodeGenerator |
||||
#define GRPC_CUSTOM_GENERATORCONTEXT \ |
||||
::google::protobuf::compiler::GeneratorContext |
||||
#endif |
||||
|
||||
#ifndef GRPC_CUSTOM_PRINTER |
||||
#include <google/protobuf/io/coded_stream.h> |
||||
#include <google/protobuf/io/printer.h> |
||||
#include <google/protobuf/io/zero_copy_stream_impl_lite.h> |
||||
#define GRPC_CUSTOM_PRINTER ::google::protobuf::io::Printer |
||||
#define GRPC_CUSTOM_CODEDOUTPUTSTREAM ::google::protobuf::io::CodedOutputStream |
||||
#define GRPC_CUSTOM_STRINGOUTPUTSTREAM \ |
||||
::google::protobuf::io::StringOutputStream |
||||
#endif |
||||
|
||||
#ifndef GRPC_CUSTOM_PLUGINMAIN |
||||
#include <google/protobuf/compiler/plugin.h> |
||||
#define GRPC_CUSTOM_PLUGINMAIN ::google::protobuf::compiler::PluginMain |
||||
#endif |
||||
|
||||
#ifndef GRPC_CUSTOM_PARSEGENERATORPARAMETER |
||||
#include <google/protobuf/compiler/code_generator.h> |
||||
#define GRPC_CUSTOM_PARSEGENERATORPARAMETER \ |
||||
::google::protobuf::compiler::ParseGeneratorParameter |
||||
#endif |
||||
|
||||
#endif // SRC_COMPILER_CONFIG_PROTOBUF_H
|
Loading…
Reference in new issue