HDFS-16469. Locate protoc-gen-hrpc across platforms (#4434)

* We use the TARGET_FILE CMake
  generator expression to get
  the location of the
  protoc-gen-hrpc CMake target.
This commit is contained in:
Gautham B A 2022-06-15 15:28:10 +05:30 committed by GitHub
parent 75bc6cfced
commit 5a40224b53
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -67,10 +67,10 @@ function(GEN_HRPC SRCS)
add_custom_command( add_custom_command(
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${FIL_WE}.hrpc.inl" OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${FIL_WE}.hrpc.inl"
COMMAND ${PROTOBUF_PROTOC_EXECUTABLE} COMMAND ${PROTOBUF_PROTOC_EXECUTABLE}
ARGS --plugin=protoc-gen-hrpc=${CMAKE_CURRENT_BINARY_DIR}/protoc-gen-hrpc --hrpc_out=${CMAKE_CURRENT_BINARY_DIR} ${_protobuf_include_path} ${ABS_FIL} ARGS --plugin=protoc-gen-hrpc=$<TARGET_FILE:protoc-gen-hrpc> --hrpc_out=${CMAKE_CURRENT_BINARY_DIR} ${_protobuf_include_path} ${ABS_FIL}
DEPENDS ${ABS_FIL} ${PROTOBUF_PROTOC_EXECUTABLE} protoc-gen-hrpc DEPENDS ${ABS_FIL} ${PROTOBUF_PROTOC_EXECUTABLE} protoc-gen-hrpc
COMMENT "Running HRPC protocol buffer compiler on ${FIL}" COMMENT "Running HRPC protocol buffer compiler on ${FIL}"
VERBATIM ) VERBATIM)
endforeach() endforeach()
set_source_files_properties(${${SRCS}} PROPERTIES GENERATED TRUE) set_source_files_properties(${${SRCS}} PROPERTIES GENERATED TRUE)