Merge pull request #18151 from dronecore/16856-fix-codegen-off-install

Bugfix: builds disabled by CODEGEN=OFF should not be installed
pull/18366/head
Jan Tattermusch 6 years ago committed by GitHub
commit e48e1e84d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      CMakeLists.txt
  2. 12
      templates/CMakeLists.txt.template

@ -3828,6 +3828,7 @@ foreach(_hdr
endforeach()
endif (gRPC_BUILD_CODEGEN)
if (gRPC_BUILD_CODEGEN)
if (gRPC_INSTALL)
install(TARGETS grpc++_error_details EXPORT gRPCTargets
@ -3837,6 +3838,7 @@ if (gRPC_INSTALL)
)
endif()
endif (gRPC_BUILD_CODEGEN)
if (gRPC_BUILD_TESTS)
if (gRPC_BUILD_CODEGEN)
@ -3958,6 +3960,7 @@ foreach(_hdr
endforeach()
endif (gRPC_BUILD_CODEGEN)
if (gRPC_BUILD_CODEGEN)
if (gRPC_INSTALL)
install(TARGETS grpc++_reflection EXPORT gRPCTargets
@ -3967,6 +3970,7 @@ if (gRPC_INSTALL)
)
endif()
endif (gRPC_BUILD_CODEGEN)
if (gRPC_BUILD_TESTS)
add_library(grpc++_test_config
@ -4959,6 +4963,7 @@ foreach(_hdr
endforeach()
endif (gRPC_BUILD_CODEGEN)
if (gRPC_BUILD_CODEGEN)
if (gRPC_INSTALL)
install(TARGETS grpcpp_channelz EXPORT gRPCTargets
@ -4968,6 +4973,7 @@ if (gRPC_INSTALL)
)
endif()
endif (gRPC_BUILD_CODEGEN)
if (gRPC_BUILD_TESTS)
if (gRPC_BUILD_CODEGEN)

@ -331,12 +331,24 @@
% elif lib.name in ['grpc_csharp_ext']:
if (gRPC_BUILD_CSHARP_EXT)
${cc_library(lib)}
% if any(proto_re.match(src) for src in lib.src):
if (gRPC_BUILD_CODEGEN)
% endif
${cc_install(lib)}
% if any(proto_re.match(src) for src in lib.src):
endif (gRPC_BUILD_CODEGEN)
% endif
endif (gRPC_BUILD_CSHARP_EXT)
% else:
${cc_library(lib)}
% if not lib.build in ["tool"]:
% if any(proto_re.match(src) for src in lib.src):
if (gRPC_BUILD_CODEGEN)
% endif
${cc_install(lib)}
% if any(proto_re.match(src) for src in lib.src):
endif (gRPC_BUILD_CODEGEN)
% endif
% endif
% endif
% endif

Loading…
Cancel
Save