This is an automated email from the ASF dual-hosted git repository.
wesm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow.git
The following commit(s) were added to refs/heads/master by this push:
new 9d73e0a ARROW-4931: [C++] CMake fails on gRPC ExternalProject
9d73e0a is described below
commit 9d73e0a544d76382617f6f723a3ac5f8cff8e033
Author: Uwe L. Korn <[email protected]>
AuthorDate: Sun Mar 17 14:48:43 2019 -0500
ARROW-4931: [C++] CMake fails on gRPC ExternalProject
Author: Uwe L. Korn <[email protected]>
Closes #3943 from xhochy/ARROW-4931 and squashes the following commits:
aa24d57c9 <Uwe L. Korn> ARROW-4931: CMake fails on gRPC ExternalProject
---
cpp/cmake_modules/ThirdpartyToolchain.cmake | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake
b/cpp/cmake_modules/ThirdpartyToolchain.cmake
index dd66d00..5c23e50 100644
--- a/cpp/cmake_modules/ThirdpartyToolchain.cmake
+++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake
@@ -1979,6 +1979,7 @@ macro(build_grpc)
add_dependencies(gRPC::grpc grpc_ep)
add_dependencies(gRPC::grpc++ grpc_ep)
add_dependencies(gRPC::address_sorting grpc_ep)
+ set(GRPC_VENDORED TRUE)
endmacro()
if(ARROW_WITH_GRPC)
@@ -2017,14 +2018,18 @@ if(ARROW_WITH_GRPC)
get_target_property(GRPC_INCLUDE_DIR gRPC::grpc
INTERFACE_INCLUDE_DIRECTORIES)
include_directories(SYSTEM ${GRPC_INCLUDE_DIR})
- # grpc++ headers may reside in ${GRPC_INCLUDE_DIR}/grpc++ or
${GRPC_INCLUDE_DIR}/grpcpp
- # depending on the gRPC version.
- if(EXISTS "${GRPC_INCLUDE_DIR}/grpcpp/impl/codegen/config_protobuf.h")
+ if(GRPC_VENDORED)
set(GRPCPP_PP_INCLUDE TRUE)
- elseif(EXISTS "${GRPC_INCLUDE_DIR}/grpc++/impl/codegen/config_protobuf.h")
- set(GRPCPP_PP_INCLUDE FALSE)
else()
- message(FATAL_ERROR "Cannot find grpc++ headers in ${GRPC_INCLUDE_DIR}")
+ # grpc++ headers may reside in ${GRPC_INCLUDE_DIR}/grpc++ or
${GRPC_INCLUDE_DIR}/grpcpp
+ # depending on the gRPC version.
+ if(EXISTS "${GRPC_INCLUDE_DIR}/grpcpp/impl/codegen/config_protobuf.h")
+ set(GRPCPP_PP_INCLUDE TRUE)
+ elseif(EXISTS "${GRPC_INCLUDE_DIR}/grpc++/impl/codegen/config_protobuf.h")
+ set(GRPCPP_PP_INCLUDE FALSE)
+ else()
+ message(FATAL_ERROR "Cannot find grpc++ headers in ${GRPC_INCLUDE_DIR}")
+ endif()
endif()
endif()