Make federated plugin work with cmake 3.16.3 (#8029)

This commit is contained in:
Rong Ou 2022-06-27 02:26:41 -07:00 committed by GitHub
parent 0725fd6081
commit 45dc1f818a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 4 deletions

View File

@ -1,6 +1,6 @@
# gRPC needs to be installed first. See README.md.
find_package(Protobuf REQUIRED)
find_package(gRPC REQUIRED)
find_package(Protobuf CONFIG REQUIRED)
find_package(gRPC CONFIG REQUIRED)
find_package(Threads)
# Generated code from the protobuf definition.
@ -18,7 +18,8 @@ protobuf_generate(
PLUGIN "protoc-gen-grpc=${grpc_cpp_plugin_location}")
# Wrapper for the gRPC client.
add_library(federated_client INTERFACE federated_client.h)
add_library(federated_client INTERFACE)
target_sources(federated_client INTERFACE federated_client.h)
target_link_libraries(federated_client INTERFACE federated_proto)
# Rabit engine for Federated Learning.

View File

@ -7,7 +7,7 @@ Install gRPC
------------
```shell
sudo apt-get install build-essential autoconf libtool pkg-config cmake ninja-build
git clone -b v1.45.2 https://github.com/grpc/grpc
git clone -b v1.47.0 https://github.com/grpc/grpc
cd grpc
git submodule update --init
cmake -S . -B build -GNinja -DABSL_PROPAGATE_CXX_STD=ON