Set full path to protoc inside _gRPC_PROTOBUF_PROTOC variable, so it …#11891
Set full path to protoc inside _gRPC_PROTOBUF_PROTOC variable, so it …#11891kskalski wants to merge 1 commit intogrpc:masterfrom
Conversation
…can work for both MODULE and PACKAGE type of protobuf provider.
|
Thanks for your pull request. The automated tests will run as soon as one of the admins verifies this change is ok for us to run on our infrastructure. |
15 similar comments
|
Thanks for your pull request. The automated tests will run as soon as one of the admins verifies this change is ok for us to run on our infrastructure. |
|
Thanks for your pull request. The automated tests will run as soon as one of the admins verifies this change is ok for us to run on our infrastructure. |
|
Thanks for your pull request. The automated tests will run as soon as one of the admins verifies this change is ok for us to run on our infrastructure. |
|
Thanks for your pull request. The automated tests will run as soon as one of the admins verifies this change is ok for us to run on our infrastructure. |
|
Thanks for your pull request. The automated tests will run as soon as one of the admins verifies this change is ok for us to run on our infrastructure. |
|
Thanks for your pull request. The automated tests will run as soon as one of the admins verifies this change is ok for us to run on our infrastructure. |
|
Thanks for your pull request. The automated tests will run as soon as one of the admins verifies this change is ok for us to run on our infrastructure. |
|
Thanks for your pull request. The automated tests will run as soon as one of the admins verifies this change is ok for us to run on our infrastructure. |
|
Thanks for your pull request. The automated tests will run as soon as one of the admins verifies this change is ok for us to run on our infrastructure. |
|
Thanks for your pull request. The automated tests will run as soon as one of the admins verifies this change is ok for us to run on our infrastructure. |
|
Thanks for your pull request. The automated tests will run as soon as one of the admins verifies this change is ok for us to run on our infrastructure. |
|
Thanks for your pull request. The automated tests will run as soon as one of the admins verifies this change is ok for us to run on our infrastructure. |
|
Thanks for your pull request. The automated tests will run as soon as one of the admins verifies this change is ok for us to run on our infrastructure. |
|
Thanks for your pull request. The automated tests will run as soon as one of the admins verifies this change is ok for us to run on our infrastructure. |
|
Thanks for your pull request. The automated tests will run as soon as one of the admins verifies this change is ok for us to run on our infrastructure. |
|
Thanks for your pull request. The automated tests will run as soon as one of the admins verifies this change is ok for us to run on our infrastructure. |
| "${_gRPC_PROTO_GENS_DIR}/${RELFIL_WE}.pb.cc" | ||
| "${_gRPC_PROTO_GENS_DIR}/${RELFIL_WE}.pb.h" | ||
| COMMAND $<TARGET_FILE:${_gRPC_PROTOBUF_PROTOC}> | ||
| COMMAND ${_gRPC_PROTOBUF_PROTOC} |
There was a problem hiding this comment.
why remove the $<TARGET_FILE: >?
There was a problem hiding this comment.
When running with cmake . -DgRPC_PROTOBUF_PROVIDER=package -DgRPC_ZLIB_PROVIDER=package -DgRPC_SSL_PROVIDER=package
I get
CMake Error at CMakeLists.txt:336 (add_custom_command):
Error evaluating generator expression:
$<TARGET_FILE:/usr/bin/protoc>
When {_gRPC_PROTOBUF_PROTOC} point to absolute path then prefixing it with anything doesn't make sense. I'm not sure what was the original intention of using TARGET_FILE here, I guess it accidentally pointed to the same directory as PROTOBUF_ROOT_DIR
| endif() | ||
| if(TARGET protoc) | ||
| set(_gRPC_PROTOBUF_PROTOC protoc) | ||
| set(_gRPC_PROTOBUF_PROTOC ${PROTOBUF_ROOT_DIR}/protoc) |
There was a problem hiding this comment.
Is that really where protoc will be located if I build protobuf as a submodule?
There was a problem hiding this comment.
This variable is set to:
set(PROTOBUF_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/protobuf)
and that directory gets protoc placed in it:
$ ls third_party/protobuf/protoc -l
-rwxr-xr-x 1 pi pi 9397460 Jul 20 18:53 third_party/protobuf/protoc
At least this is what happens when I build with this setting
|
Should be fixed by #12411 |
…can work for both MODULE and PACKAGE type of protobuf provider.