Skip to content

Commit

Permalink
apacheGH-44448: [C++] Add support for overriding grpc_cpp_plugin path…
Browse files Browse the repository at this point in the history
… for cross-compiling
  • Loading branch information
kou committed Oct 23, 2024
1 parent 67850be commit 16abea8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cpp/cmake_modules/DefineOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -640,6 +640,11 @@ Always OFF if building binaries" OFF)
"Compiler flags to append when pre-compiling Gandiva operations"
"")

#----------------------------------------------------------------------
set_option_category("Cross compiling")

define_option_string(ARROW_GRPC_CPP_PLUGIN "grpc_cpp_plugin path to be used" "")

#----------------------------------------------------------------------
set_option_category("Advanced developer")

Expand Down
8 changes: 8 additions & 0 deletions cpp/cmake_modules/ThirdpartyToolchain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4223,6 +4223,14 @@ if(ARROW_WITH_GRPC)
target_link_libraries(gRPC::grpc++ INTERFACE gRPC::grpc_asan_suppressed)
endif()
endif()

if(ARROW_GRPC_CPP_PLUGIN)
if(NOT TARGET gRPC::grpc_cpp_plugin)
add_executable(gRPC::grpc_cpp_plugin IMPORTED)
endif()
set_target_properties(gRPC::grpc_cpp_plugin PROPERTIES IMPORTED_LOCATION
${ARROW_GRPC_CPP_PLUGIN})
endif()
endif()

# ----------------------------------------------------------------------
Expand Down

0 comments on commit 16abea8

Please sign in to comment.