diff options
-rw-r--r-- | Makefile | 1 | ||||
-rw-r--r-- | build.yaml | 3 | ||||
-rw-r--r-- | include/grpc++/impl/codegen/proto_serializer.cc | 41 | ||||
-rw-r--r-- | src/cpp/proto/proto_serializer.cc | 2 | ||||
-rw-r--r-- | tools/run_tests/sources_and_headers.json | 1 | ||||
-rw-r--r-- | vsprojects/vcxproj/grpc++_codegen_lib/grpc++_codegen_lib.vcxproj | 2 | ||||
-rw-r--r-- | vsprojects/vcxproj/grpc++_codegen_lib/grpc++_codegen_lib.vcxproj.filters | 5 |
7 files changed, 52 insertions, 3 deletions
@@ -3153,6 +3153,7 @@ endif LIBGRPC++_CODEGEN_LIB_SRC = \ + include/grpc++/impl/codegen/proto_serializer.cc \ PUBLIC_HEADERS_CXX += \ include/grpc++/impl/codegen/async_stream.h \ diff --git a/build.yaml b/build.yaml index 9c946a81ac..40fdc30feb 100644 --- a/build.yaml +++ b/build.yaml @@ -748,7 +748,8 @@ libs: - include/grpc++/impl/codegen/sync_stream.h - include/grpc++/impl/codegen/time.h headers: [] - src: [] + src: + - include/grpc++/impl/codegen/proto_serializer.cc deps: - grpc_codegen_lib filegroups: diff --git a/include/grpc++/impl/codegen/proto_serializer.cc b/include/grpc++/impl/codegen/proto_serializer.cc new file mode 100644 index 0000000000..456567e080 --- /dev/null +++ b/include/grpc++/impl/codegen/proto_serializer.cc @@ -0,0 +1,41 @@ +/* + * + * Copyright 2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +// TODO(dgq): This file is part of a temporary fix to work around codegen +// issues. +// +// This whole file will be removed in the future. + +#include <grpc++/impl/codegen/proto_utils.h> + +grpc::ProtoSerializerInterface* grpc::g_proto_serializer = nullptr; diff --git a/src/cpp/proto/proto_serializer.cc b/src/cpp/proto/proto_serializer.cc index 3591417172..d5ed138561 100644 --- a/src/cpp/proto/proto_serializer.cc +++ b/src/cpp/proto/proto_serializer.cc @@ -36,7 +36,7 @@ // // This whole file will be removed in the future. -#include <grpc++/impl/proto_utils.h> +#include <grpc++/impl/codegen/proto_utils.h> static grpc::ProtoSerializer proto_serializer; grpc::ProtoSerializerInterface* grpc::g_proto_serializer = &proto_serializer; diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index fd4bbdb41b..b464cae7e4 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -5110,6 +5110,7 @@ "include/grpc++/impl/codegen/config_protobuf.h", "include/grpc++/impl/codegen/grpc_library.h", "include/grpc++/impl/codegen/method_handler_impl.h", + "include/grpc++/impl/codegen/proto_serializer.cc", "include/grpc++/impl/codegen/proto_utils.h", "include/grpc++/impl/codegen/rpc_method.h", "include/grpc++/impl/codegen/rpc_service_method.h", diff --git a/vsprojects/vcxproj/grpc++_codegen_lib/grpc++_codegen_lib.vcxproj b/vsprojects/vcxproj/grpc++_codegen_lib/grpc++_codegen_lib.vcxproj index 811e0bdd18..d64afde0ce 100644 --- a/vsprojects/vcxproj/grpc++_codegen_lib/grpc++_codegen_lib.vcxproj +++ b/vsprojects/vcxproj/grpc++_codegen_lib/grpc++_codegen_lib.vcxproj @@ -193,7 +193,7 @@ <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\time.h" /> </ItemGroup> <ItemGroup> - <ClCompile Include="$(SolutionDir)\..\vsprojects\dummy.c"> + <ClCompile Include="$(SolutionDir)\..\include\grpc++\impl\codegen\proto_serializer.cc"> </ClCompile> </ItemGroup> <ItemGroup> diff --git a/vsprojects/vcxproj/grpc++_codegen_lib/grpc++_codegen_lib.vcxproj.filters b/vsprojects/vcxproj/grpc++_codegen_lib/grpc++_codegen_lib.vcxproj.filters index 582d88b8cc..a3e3ac8c35 100644 --- a/vsprojects/vcxproj/grpc++_codegen_lib/grpc++_codegen_lib.vcxproj.filters +++ b/vsprojects/vcxproj/grpc++_codegen_lib/grpc++_codegen_lib.vcxproj.filters @@ -1,6 +1,11 @@ <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ItemGroup> + <ClCompile Include="$(SolutionDir)\..\include\grpc++\impl\codegen\proto_serializer.cc"> + <Filter>include\grpc++\impl\codegen</Filter> + </ClCompile> + </ItemGroup> + <ItemGroup> <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\async_stream.h"> <Filter>include\grpc++\impl\codegen</Filter> </ClInclude> |