Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ jobs:
ARROW_BUILD_STATIC: OFF
ARROW_BUILD_TESTS: ON
ARROW_DATASET: ON
ARROW_FLIGHT: OFF
ARROW_FLIGHT: ON
ARROW_HDFS: ON
ARROW_HOME: /usr
ARROW_JEMALLOC: OFF
Expand Down
15 changes: 14 additions & 1 deletion cpp/src/arrow/flight/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,23 @@ set(FLIGHT_PROTOC_COMMAND ${ARROW_PROTOBUF_PROTOC} "-I${FLIGHT_PROTO_PATH}")
if(Protobuf_VERSION VERSION_LESS 3.15)
list(APPEND FLIGHT_PROTOC_COMMAND "--experimental_allow_proto3_optional")
endif()

if(MSVC)
if(ARROW_BUILD_STATIC)
set(FLIGHT_PROTOC_VISIBILITY "")
else()
set(FLIGHT_PROTOC_VISIBILITY "dllexport_decl=__declspec(dllexport):")
endif()
else()
set(FLIGHT_PROTOC_VISIBILITY
"dllexport_decl=__attribute__((visibility(\\\"default\\\"))):")
endif()

add_custom_command(OUTPUT ${FLIGHT_GENERATED_PROTO_FILES}
DEPENDS ${PROTO_DEPENDS} ARGS
COMMAND ${FLIGHT_PROTOC_COMMAND}
"--cpp_out=${CMAKE_CURRENT_BINARY_DIR}" "${FLIGHT_PROTO}"
"--cpp_out=${FLIGHT_PROTOC_VISIBILITY}${CMAKE_CURRENT_BINARY_DIR}"
"${FLIGHT_PROTO}"
COMMAND ${FLIGHT_PROTOC_COMMAND}
"--grpc_out=${CMAKE_CURRENT_BINARY_DIR}"
"--plugin=protoc-gen-grpc=$<TARGET_FILE:gRPC::grpc_cpp_plugin>"
Expand Down
4 changes: 0 additions & 4 deletions cpp/src/arrow/flight/flight_internals_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -702,7 +702,6 @@ TEST_F(TestCookieParsing, CookieCache) {
// Protobuf tests

TEST(GrpcTransport, FlightDataDeserialize) {
#ifndef _WIN32
pb::FlightData raw;
// Tack on known and unknown fields by hand here
raw.GetReflection()->MutableUnknownFields(&raw)->AddFixed32(900, 1024);
Expand All @@ -725,9 +724,6 @@ TEST(GrpcTransport, FlightDataDeserialize) {
ASSERT_EQ("data", out.body->ToString());

grpc_slice_unref(slice);
#else
GTEST_SKIP() << "Can't use Protobuf symbols on Windows";
#endif
}

// ----------------------------------------------------------------------
Expand Down
Loading