@@ -34,29 +34,6 @@ if(NOT ARROW_GRPC_USE_SHARED)
3434 message (STATUS "Linking Arrow Flight tests statically due to static gRPC" )
3535 set (ARROW_FLIGHT_TEST_LINKAGE "static" )
3636endif ()
37- if (ARROW_TESTING)
38- if (WIN32 )
39- # We need to use the same library type for arrow_flight_testing
40- # and Google Test because arrow_flight_testing has
41- # arrow::flight:FlightTest that inherits testing::Test. If
42- # arrow_flight_testing's library type and gtest's library type are
43- # different such as arrow_flight_testing is a shared library and
44- # gtest is a static library, link error is occurred.
45- get_target_property (GTEST_TYPE GTest::gtest TYPE )
46- if (GTEST_TYPE STREQUAL "SHARED_LIBRARY" )
47- set (ARROW_FLIGHT_TESTING_BUILD_SHARED TRUE )
48- set (ARROW_FLIGHT_TESTING_BUILD_STATIC FALSE )
49- else ()
50- set (ARROW_FLIGHT_TESTING_BUILD_SHARED FALSE )
51- set (ARROW_FLIGHT_TESTING_BUILD_STATIC TRUE )
52- message (STATUS "Linking Arrow Flight tests statically due to static GTest" )
53- set (ARROW_FLIGHT_TEST_LINKAGE "static" )
54- endif ()
55- else ()
56- set (ARROW_FLIGHT_TESTING_BUILD_SHARED ${ARROW_BUILD_SHARED} )
57- set (ARROW_FLIGHT_TESTING_BUILD_STATIC ${ARROW_BUILD_STATIC} )
58- endif ()
59- endif ()
6037
6138set (ARROW_FLIGHT_TEST_INTERFACE_LIBS)
6239if (ARROW_FLIGHT_TEST_LINKAGE STREQUAL "static" )
@@ -280,10 +257,6 @@ if(ARROW_TESTING)
280257 list (APPEND ARROW_FLIGHT_TESTING_SHARED_LINK_LIBS ${ARROW_FLIGHT_TEST_INTERFACE_LIBS} )
281258 list (APPEND ARROW_FLIGHT_TESTING_STATIC_LINK_LIBS ${ARROW_FLIGHT_TEST_INTERFACE_LIBS} )
282259 add_arrow_lib (arrow_flight_testing
283- BUILD_SHARED
284- ${ARROW_FLIGHT_TESTING_BUILD_SHARED}
285- BUILD_STATIC
286- ${ARROW_FLIGHT_TESTING_BUILD_STATIC}
287260 CMAKE_PACKAGE_NAME
288261 ArrowFlightTesting
289262 PKG_CONFIG_NAME
@@ -325,7 +298,7 @@ add_arrow_test(flight_test
325298if (ARROW_BUILD_TESTS OR ARROW_BUILD_BENCHMARKS)
326299 add_executable (flight-test-server test_server.cc )
327300 target_link_libraries (flight-test-server ${ARROW_FLIGHT_TEST_LINK_LIBS}
328- ${GFLAGS_LIBRARIES} GTest::gtest )
301+ ${GFLAGS_LIBRARIES} )
329302
330303 if (ARROW_BUILD_TESTS)
331304 add_dependencies (arrow-flight-test flight-test-server )
@@ -346,11 +319,11 @@ if(ARROW_BUILD_BENCHMARKS)
346319
347320 add_executable (arrow-flight-perf-server perf_server.cc perf.pb.cc )
348321 target_link_libraries (arrow-flight-perf-server ${ARROW_FLIGHT_TEST_LINK_LIBS}
349- ${GFLAGS_LIBRARIES} GTest::gtest )
322+ ${GFLAGS_LIBRARIES} )
350323
351324 add_executable (arrow-flight-benchmark flight_benchmark.cc perf.pb.cc )
352325 target_link_libraries (arrow-flight-benchmark ${ARROW_FLIGHT_TEST_LINK_LIBS}
353- ${GFLAGS_LIBRARIES} GTest::gtest )
326+ ${GFLAGS_LIBRARIES} )
354327
355328 add_dependencies (arrow-flight-benchmark arrow-flight-perf-server )
356329
0 commit comments