Merge pull request #21011 from zackgalbreath/fix_proto_lite_cmake

Do not build channelz when gRPC_USE_PROTO_LITE
pull/21223/head
Jan Tattermusch 5 years ago committed by GitHub
commit c174e6797a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      CMakeLists.txt
  2. 6
      templates/CMakeLists.txt.template

@ -5255,7 +5255,9 @@ if(gRPC_INSTALL)
endif()
if(gRPC_BUILD_CODEGEN)
# grpcpp_channelz doesn't build with protobuf-lite
# See https://github.com/grpc/grpc/issues/19473
if(gRPC_BUILD_CODEGEN AND NOT gRPC_USE_PROTO_LITE)
add_library(grpcpp_channelz
src/cpp/server/channelz/channelz_service.cc
src/cpp/server/channelz/channelz_service_plugin.cc

@ -446,8 +446,14 @@
<%def name="cc_library(lib)">
% if any(proto_re.match(src) for src in lib.src):
% if lib.name == 'grpcpp_channelz':
# grpcpp_channelz doesn't build with protobuf-lite
# See https://github.com/grpc/grpc/issues/19473
if(gRPC_BUILD_CODEGEN AND NOT gRPC_USE_PROTO_LITE)
% else:
if(gRPC_BUILD_CODEGEN)
% endif
% endif
add_library(${lib.name}${' SHARED' if lib.get('dll', None) == 'only' else ''}
% for src in lib.src:
% if not proto_re.match(src):

Loading…
Cancel
Save