aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Jan Tattermusch <jtattermusch@users.noreply.github.com>2017-06-19 12:11:52 +0200
committerGravatar GitHub <noreply@github.com>2017-06-19 12:11:52 +0200
commitb82bfa4e95f0bc90c45c3eff8f86c701b4769f74 (patch)
tree81c0690785aee48e6ac712505d28809243d88b70
parentc39e8ddd0a7319168e9aaf1fe131ab9fc845c6f5 (diff)
parent6fe1d803359fdf48813602521cd6c1a3b09e75bf (diff)
Merge pull request #11469 from jtattermusch/cmake_explicit_protoc
Explicitly use built protoc for CMake build
-rw-r--r--CMakeLists.txt2
-rw-r--r--templates/CMakeLists.txt.template2
2 files changed, 2 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1248f096a9..8b3c8505a0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -304,7 +304,7 @@ function(protobuf_generate_grpc_cpp)
"${_gRPC_PROTO_GENS_DIR}/${RELFIL_WE}_mock.grpc.pb.h"
"${_gRPC_PROTO_GENS_DIR}/${RELFIL_WE}.pb.cc"
"${_gRPC_PROTO_GENS_DIR}/${RELFIL_WE}.pb.h"
- COMMAND ${_gRPC_PROTOBUF_PROTOC}
+ COMMAND $<TARGET_FILE:${_gRPC_PROTOBUF_PROTOC}>
ARGS --grpc_out=generate_mock_code=true:${_gRPC_PROTO_GENS_DIR}
--cpp_out=${_gRPC_PROTO_GENS_DIR}
--plugin=protoc-gen-grpc=$<TARGET_FILE:grpc_cpp_plugin>
diff --git a/templates/CMakeLists.txt.template b/templates/CMakeLists.txt.template
index 53ae543c4c..0cc2ae8020 100644
--- a/templates/CMakeLists.txt.template
+++ b/templates/CMakeLists.txt.template
@@ -349,7 +349,7 @@
<%text>"${_gRPC_PROTO_GENS_DIR}/${RELFIL_WE}_mock.grpc.pb.h"</%text>
<%text>"${_gRPC_PROTO_GENS_DIR}/${RELFIL_WE}.pb.cc"</%text>
<%text>"${_gRPC_PROTO_GENS_DIR}/${RELFIL_WE}.pb.h"</%text>
- COMMAND <%text>${_gRPC_PROTOBUF_PROTOC}</%text>
+ COMMAND <%text>$<TARGET_FILE:${_gRPC_PROTOBUF_PROTOC}></%text>
ARGS --grpc_out=<%text>generate_mock_code=true:${_gRPC_PROTO_GENS_DIR}</%text>
--cpp_out=<%text>${_gRPC_PROTO_GENS_DIR}</%text>
--plugin=protoc-gen-grpc=$<TARGET_FILE:grpc_cpp_plugin>