-
Notifications
You must be signed in to change notification settings - Fork 146
Upgrade gRPC version to 1.48.0 #2784
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
shgandhi
wants to merge
2
commits into
vmware:master
Choose a base branch
from
shgandhi:grpc-upgrade
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,21 +1,102 @@ | ||
| cmake_minimum_required(VERSION 3.5) | ||
| set(CMAKE_CXX_STANDARD 17) | ||
|
|
||
| project(concord) | ||
|
|
||
| find_package(Protobuf REQUIRED) | ||
| find_package(absl CONFIG REQUIRED) | ||
| find_package(GRPC REQUIRED) | ||
|
|
||
| include_directories(${GRPC_INCLUDE_DIR}) | ||
|
|
||
| protobuf_generate_cpp(PROTO_SRCS PROTO_HDRS ${CMAKE_CURRENT_BINARY_DIR} | ||
| request/v1/request.proto | ||
| event/v1/event.proto | ||
| state_snapshot/v1/state_snapshot.proto | ||
| ../concordclient/proto/concord_client_request/v1/concord_client_request.proto | ||
| ) | ||
| grpc_generate_cpp(GRPC_SRCS GRPC_HDRS ${CMAKE_CURRENT_BINARY_DIR} | ||
| request/v1/request.proto | ||
| event/v1/event.proto | ||
| state_snapshot/v1/state_snapshot.proto | ||
| ../concordclient/proto/concord_client_request/v1/concord_client_request.proto | ||
| ) | ||
|
|
||
| add_library(clientservice-proto STATIC ${PROTO_SRCS} ${GRPC_SRCS}) | ||
| target_link_libraries(clientservice-proto PRIVATE protobuf::libprotobuf gRPC::grpc++) | ||
| # Proto file | ||
| get_filename_component(rs_proto "request/v1/request.proto" ABSOLUTE) | ||
| get_filename_component(es_proto "event/v1/event.proto" ABSOLUTE) | ||
| get_filename_component(ss_proto "state_snapshot/v1/state_snapshot.proto" ABSOLUTE) | ||
| get_filename_component(ccr_proto "../concordclient/proto/concord_client_request/v1/concord_client_request.proto" ABSOLUTE) | ||
| get_filename_component(rs_proto_path "${rs_proto}" PATH) | ||
| get_filename_component(es_proto_path "${es_proto}" PATH) | ||
| get_filename_component(ss_proto_path "${ss_proto}" PATH) | ||
| get_filename_component(ccr_proto_path "${ccr_proto}" PATH) | ||
|
|
||
| get_target_property(grpc_cpp_plugin_location gRPC::grpc_cpp_plugin LOCATION) | ||
|
|
||
| # Generated sources | ||
| set(rs_proto_srcs "${CMAKE_CURRENT_BINARY_DIR}/request.pb.cc") | ||
| set(rs_proto_hdrs "${CMAKE_CURRENT_BINARY_DIR}/request.pb.h") | ||
| set(rs_grpc_srcs "${CMAKE_CURRENT_BINARY_DIR}/request.grpc.pb.cc") | ||
| set(rs_grpc_hdrs "${CMAKE_CURRENT_BINARY_DIR}/request.grpc.pb.h") | ||
| add_custom_command( | ||
| OUTPUT "${rs_proto_srcs}" "${rs_proto_hdrs}" "${rs_grpc_srcs}" "${rs_grpc_hdrs}" | ||
| COMMAND protoc | ||
| ARGS --grpc_out "${CMAKE_CURRENT_BINARY_DIR}" | ||
| --cpp_out "${CMAKE_CURRENT_BINARY_DIR}" | ||
| -I "${rs_proto_path}" | ||
| --plugin=protoc-gen-grpc="${grpc_cpp_plugin_location}" | ||
| "${rs_proto}" | ||
| DEPENDS "${rs_proto}") | ||
|
|
||
| set(es_proto_srcs "${CMAKE_CURRENT_BINARY_DIR}/event.pb.cc") | ||
| set(es_proto_hdrs "${CMAKE_CURRENT_BINARY_DIR}/event.pb.h") | ||
| set(es_grpc_srcs "${CMAKE_CURRENT_BINARY_DIR}/event.grpc.pb.cc") | ||
| set(es_grpc_hdrs "${CMAKE_CURRENT_BINARY_DIR}/event.grpc.pb.h") | ||
| add_custom_command( | ||
| OUTPUT "${es_proto_srcs}" "${es_proto_hdrs}" "${es_grpc_srcs}" "${es_grpc_hdrs}" | ||
| COMMAND protoc | ||
| ARGS --grpc_out "${CMAKE_CURRENT_BINARY_DIR}" | ||
| --cpp_out "${CMAKE_CURRENT_BINARY_DIR}" | ||
| -I "${es_proto_path}" | ||
| --plugin=protoc-gen-grpc="${grpc_cpp_plugin_location}" | ||
| "${es_proto}" | ||
| DEPENDS "${es_proto}") | ||
|
|
||
| set(ss_proto_srcs "${CMAKE_CURRENT_BINARY_DIR}/state_snapshot.pb.cc") | ||
| set(ss_proto_hdrs "${CMAKE_CURRENT_BINARY_DIR}/state_snapshot.pb.h") | ||
| set(ss_grpc_srcs "${CMAKE_CURRENT_BINARY_DIR}/state_snapshot.grpc.pb.cc") | ||
| set(ss_grpc_hdrs "${CMAKE_CURRENT_BINARY_DIR}/state_snapshot.grpc.pb.h") | ||
| add_custom_command( | ||
| OUTPUT "${ss_proto_srcs}" "${ss_proto_hdrs}" "${ss_grpc_srcs}" "${ss_grpc_hdrs}" | ||
| COMMAND protoc | ||
| ARGS --grpc_out "${CMAKE_CURRENT_BINARY_DIR}" | ||
| --cpp_out "${CMAKE_CURRENT_BINARY_DIR}" | ||
| -I "${ss_proto_path}" | ||
| --plugin=protoc-gen-grpc="${grpc_cpp_plugin_location}" | ||
| "${ss_proto}" | ||
| DEPENDS "${ss_proto}") | ||
|
|
||
| set(ccr_proto_srcs "${CMAKE_CURRENT_BINARY_DIR}/concord_client_request.pb.cc") | ||
| set(ccr_proto_hdrs "${CMAKE_CURRENT_BINARY_DIR}/concord_client_request.pb.h") | ||
| set(ccr_grpc_srcs "${CMAKE_CURRENT_BINARY_DIR}/concord_client_request.grpc.pb.cc") | ||
| set(ccr_grpc_hdrs "${CMAKE_CURRENT_BINARY_DIR}/concord_client_request.grpc.pb.h") | ||
| add_custom_command( | ||
| OUTPUT "${ccr_proto_srcs}" "${ccr_proto_hdrs}" "${ccr_grpc_srcs}" "${ccr_grpc_hdrs}" | ||
| COMMAND protoc | ||
| ARGS --grpc_out "${CMAKE_CURRENT_BINARY_DIR}" | ||
| --cpp_out "${CMAKE_CURRENT_BINARY_DIR}" | ||
| -I "${ccr_proto_path}" | ||
| --plugin=protoc-gen-grpc="${grpc_cpp_plugin_location}" | ||
| "${ccr_proto}" | ||
| DEPENDS "${ccr_proto}") | ||
|
|
||
|
|
||
| # Include generated *.pb.h files | ||
| include_directories("${CMAKE_CURRENT_BINARY_DIR}") | ||
|
|
||
| # clientservice-proto | ||
| add_library(clientservice-proto STATIC | ||
| ${rs_grpc_srcs} | ||
| ${rs_grpc_hdrs} | ||
| ${rs_proto_srcs} | ||
| ${rs_proto_hdrs} | ||
| ${es_grpc_srcs} | ||
| ${es_grpc_hdrs} | ||
| ${es_proto_srcs} | ||
| ${es_proto_hdrs} | ||
| ${ss_grpc_srcs} | ||
| ${ss_grpc_hdrs} | ||
| ${ss_proto_srcs} | ||
| ${ss_proto_hdrs} | ||
| ${ccr_grpc_srcs} | ||
| ${ccr_grpc_hdrs} | ||
| ${ccr_proto_srcs} | ||
| ${ccr_proto_hdrs}) | ||
| target_link_libraries(clientservice-proto PRIVATE protobuf::libprotobuf gRPC::grpc++ absl::synchronization) | ||
| target_include_directories(clientservice-proto PUBLIC ${CMAKE_CURRENT_BINARY_DIR}) | ||
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,27 @@ | ||
| find_package(Protobuf REQUIRED) | ||
| cmake_minimum_required(VERSION 3.5) | ||
| set(CMAKE_CXX_STANDARD 17) | ||
|
|
||
| find_package(absl CONFIG REQUIRED) | ||
| find_package(GRPC REQUIRED) | ||
| find_package(Protobuf CONFIG REQUIRED) | ||
|
|
||
| # Proto file | ||
| get_filename_component(concord_kvbc_proto "concord_kvbc.proto" ABSOLUTE) | ||
| get_filename_component(concord_kvbc_proto_path "${concord_kvbc_proto}" PATH) | ||
|
|
||
| set(ck_proto_srcs "${CMAKE_CURRENT_BINARY_DIR}/concord_kvbc.pb.cc") | ||
| set(ck_proto_hdrs "${CMAKE_CURRENT_BINARY_DIR}/concord_kvbc.pb.h") | ||
|
|
||
| add_custom_command( | ||
| OUTPUT "${ck_proto_srcs}" "${ck_proto_hdrs}" | ||
| COMMAND protoc | ||
| ARGS --proto_path="${concord_kvbc_proto_path}" | ||
| --cpp_out "${CMAKE_CURRENT_BINARY_DIR}" | ||
| "${concord_kvbc_proto}" | ||
| DEPENDS "${concord_kvbc_proto}") | ||
|
|
||
| protobuf_generate_cpp(PROTO_SRCS PROTO_HDRS ${CMAKE_CURRENT_BINARY_DIR} | ||
| concord_kvbc.proto | ||
| ) | ||
| message(STATUS "Concord KVBC protobuf generated - see " ${CMAKE_CURRENT_BINARY_DIR}) | ||
|
|
||
| add_library(concord-kvbc-proto STATIC ${PROTO_SRCS}) | ||
| add_library(concord-kvbc-proto STATIC ${ck_proto_srcs}) | ||
| target_link_libraries(concord-kvbc-proto protobuf::libprotobuf) | ||
| target_include_directories(concord-kvbc-proto PUBLIC ${CMAKE_CURRENT_BINARY_DIR}) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.