Explorar el Código

Add a macro to support protobuf lite

yang-g hace 9 años
padre
commit
e6c04aa612
Se han modificado 1 ficheros con 5 adiciones y 0 borrados
  1. 5 0
      include/grpc++/impl/codegen/config_protobuf.h

+ 5 - 0
include/grpc++/impl/codegen/config_protobuf.h

@@ -40,9 +40,14 @@
 #endif
 
 #ifndef GRPC_CUSTOM_MESSAGE
+#ifdef GRPC_USE_PROTO_LITE
+#include <google/protobuf/message_lite.h>
+#define GRPC_CUSTOM_MESSAGE ::google::protobuf::MessageLite
+#else
 #include <google/protobuf/message.h>
 #define GRPC_CUSTOM_MESSAGE ::google::protobuf::Message
 #endif
+#endif
 
 #ifndef GRPC_CUSTOM_DESCRIPTOR
 #include <google/protobuf/descriptor.h>