aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/compiler/cpp_plugin.cc
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2016-03-30 17:12:29 -0700
committerGravatar Craig Tiller <ctiller@google.com>2016-03-30 17:12:29 -0700
commit076c2b807b6417714dac026e77184be032fdc5b1 (patch)
tree5202e61a72b9fd7e39f73cf43e39a4d4520edebf /src/compiler/cpp_plugin.cc
parent24e69bf02afb0f4abdd637d1513e93e5aa227e7e (diff)
parenta5dc80d22ae03f76525f030fb1bfd47c0d8266a2 (diff)
Merge github.com:grpc/grpc into channel_max_reconnect_backoff
Diffstat (limited to 'src/compiler/cpp_plugin.cc')
-rw-r--r--src/compiler/cpp_plugin.cc14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/compiler/cpp_plugin.cc b/src/compiler/cpp_plugin.cc
index 88c704948e..d8ada4835c 100644
--- a/src/compiler/cpp_plugin.cc
+++ b/src/compiler/cpp_plugin.cc
@@ -1,6 +1,6 @@
/*
*
- * Copyright 2015, Google Inc.
+ * Copyright 2015-2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -59,6 +59,7 @@ class CppGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator {
}
grpc_cpp_generator::Parameters generator_parameters;
+ generator_parameters.use_system_headers = true;
if (!parameter.empty()) {
std::vector<grpc::string> parameters_list =
@@ -70,6 +71,17 @@ class CppGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator {
grpc_generator::tokenize(*parameter_string, "=");
if (param[0] == "services_namespace") {
generator_parameters.services_namespace = param[1];
+ } else if (param[0] == "use_system_headers") {
+ if (param[1] == "true") {
+ generator_parameters.use_system_headers = true;
+ } else if (param[1] == "false") {
+ generator_parameters.use_system_headers = false;
+ } else {
+ *error = grpc::string("Invalid parameter: ") + *parameter_string;
+ return false;
+ }
+ } else if (param[0] == "grpc_search_path") {
+ generator_parameters.grpc_search_path = param[1];
} else {
*error = grpc::string("Unknown parameter: ") + *parameter_string;
return false;