Fix for recent cmake failure owing to gmock
This commit is contained in:
parent
78e0864d3d
commit
78ca0d1d57
243
CMakeLists.txt
243
CMakeLists.txt
File diff suppressed because it is too large
Load Diff
|
|
@ -361,10 +361,11 @@
|
|||
add_custom_command(
|
||||
OUTPUT <%text>"${_gRPC_PROTO_GENS_DIR}/${RELFIL_WE}.grpc.pb.cc"</%text>
|
||||
<%text>"${_gRPC_PROTO_GENS_DIR}/${RELFIL_WE}.grpc.pb.h"</%text>
|
||||
<%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>
|
||||
ARGS --grpc_out=<%text>${_gRPC_PROTO_GENS_DIR}</%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>
|
||||
<%text>${_protobuf_include_path}</%text>
|
||||
|
|
@ -374,7 +375,7 @@
|
|||
COMMENT "Running gRPC C++ protocol buffer compiler on <%text>${FIL}</%text>"
|
||||
VERBATIM)
|
||||
|
||||
<%text>set_source_files_properties("${_gRPC_PROTO_GENS_DIR}/${RELFIL_WE}.grpc.pb.cc" "${_gRPC_PROTO_GENS_DIR}/${RELFIL_WE}.grpc.pb.h" "${_gRPC_PROTO_GENS_DIR}/${RELFIL_WE}.pb.cc" "${_gRPC_PROTO_GENS_DIR}/${RELFIL_WE}.pb.h" PROPERTIES GENERATED TRUE)</%text>
|
||||
<%text>set_source_files_properties("${_gRPC_PROTO_GENS_DIR}/${RELFIL_WE}.grpc.pb.cc" "${_gRPC_PROTO_GENS_DIR}/${RELFIL_WE}.grpc.pb.h" "${_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" PROPERTIES GENERATED TRUE)</%text>
|
||||
endforeach()
|
||||
endfunction()
|
||||
|
||||
|
|
@ -475,6 +476,9 @@
|
|||
${proto_replace_ext(src, '.grpc.pb.cc')}
|
||||
${proto_replace_ext(src, '.pb.h')}
|
||||
${proto_replace_ext(src, '.grpc.pb.h')}
|
||||
% if src in ["src/proto/grpc/testing/compiler_test.proto", "src/proto/grpc/testing/echo.proto"]:
|
||||
${proto_replace_ext(src, '_mock.grpc.pb.h')}
|
||||
% endif
|
||||
% endif
|
||||
% endfor
|
||||
)
|
||||
|
|
@ -514,6 +518,8 @@
|
|||
% if lib.build in ['test', 'private'] and lib.language == 'c++':
|
||||
PRIVATE third_party/googletest/googletest/include
|
||||
PRIVATE third_party/googletest/googletest
|
||||
PRIVATE third_party/googletest/googlemock/include
|
||||
PRIVATE third_party/googletest/googlemock
|
||||
% endif
|
||||
% if lib.language == 'c++':
|
||||
PRIVATE <%text>${_gRPC_PROTO_GENS_DIR}</%text>
|
||||
|
|
@ -557,6 +563,7 @@
|
|||
% endfor
|
||||
% if tgt.build == 'test' and tgt.language == 'c++':
|
||||
third_party/googletest/googletest/src/gtest-all.cc
|
||||
third_party/googletest/googlemock/src/gmock-all.cc
|
||||
% endif
|
||||
)
|
||||
|
||||
|
|
@ -584,6 +591,8 @@
|
|||
% if tgt.build in ['test', 'private'] and tgt.language == 'c++':
|
||||
PRIVATE third_party/googletest/googletest/include
|
||||
PRIVATE third_party/googletest/googletest
|
||||
PRIVATE third_party/googletest/googlemock/include
|
||||
PRIVATE third_party/googletest/googlemock
|
||||
% endif
|
||||
% if tgt.language == 'c++':
|
||||
PRIVATE <%text>${_gRPC_PROTO_GENS_DIR}</%text>
|
||||
|
|
|
|||
Loading…
Reference in New Issue