Skip to content

Commit

Permalink
Add missing gmock dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Aug 31, 2023
1 parent 763a7e9 commit d47cfbc
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 14 deletions.
5 changes: 1 addition & 4 deletions cpp/cmake_modules/ThirdpartyToolchain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2103,10 +2103,7 @@ macro(build_gtest)
URL_HASH "SHA256=${ARROW_GTEST_BUILD_SHA256_CHECKSUM}")
prepare_fetchcontent()
if(APPLE)
string(APPEND
CMAKE_CXX_FLAGS
" -Wno-unused-value"
" -Wno-ignored-attributes")
string(APPEND CMAKE_CXX_FLAGS " -Wno-unused-value" " -Wno-ignored-attributes")
endif()
set(BUILD_SHARED_LIBS ON)
set(BUILD_STATIC_LIBS OFF)
Expand Down
17 changes: 9 additions & 8 deletions cpp/src/arrow/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,11 @@ if(ARROW_WITH_ZSTD)
list(APPEND ARROW_SRCS util/compression_zstd.cc)
endif()

set(ARROW_TESTING_SHARED_LINK_LIBS arrow::flatbuffers rapidjson::rapidjson arrow_shared
${ARROW_GTEST_GTEST})
set(ARROW_TESTING_STATIC_LINK_LIBS arrow::flatbuffers rapidjson::rapidjson arrow_static
${ARROW_GTEST_GTEST})

set(ARROW_TESTING_SRCS
io/test_common.cc
ipc/test_common.cc
Expand Down Expand Up @@ -503,6 +508,8 @@ if(ARROW_FILESYSTEM)
SKIP_UNITY_BUILD_INCLUSION ON)
endif()

list(APPEND ARROW_TESTING_SHARED_LINK_LIBS ${ARROW_GTEST_GMOCK})
list(APPEND ARROW_TESTING_STATIC_LINK_LIBS ${ARROW_GTEST_GMOCK})
list(APPEND ARROW_TESTING_SRCS filesystem/test_util.cc)
endif()

Expand Down Expand Up @@ -728,17 +735,11 @@ if(ARROW_TESTING)
DEPENDENCIES
arrow_test_dependencies
SHARED_LINK_LIBS
arrow::flatbuffers
rapidjson::rapidjson
arrow_shared
${ARROW_GTEST_GTEST}
${ARROW_TESTING_SHARED_LINK_LIBS}
SHARED_INSTALL_INTERFACE_LIBS
${ARROW_TESTING_SHARED_INSTALL_INTERFACE_LIBS}
STATIC_LINK_LIBS
arrow::flatbuffers
rapidjson::rapidjson
arrow_static
${ARROW_GTEST_GTEST}
${ARROW_TESTING_STATIC_LINK_LIBS}
STATIC_INSTALL_INTERFACE_LIBS
${ARROW_TESTING_STATIC_INSTALL_INTERFACE_LIBS})

Expand Down
4 changes: 3 additions & 1 deletion cpp/src/arrow/compute/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,9 @@ add_arrow_test(internals_test
kernel_test.cc
light_array_test.cc
registry_test.cc
key_hash_test.cc)
key_hash_test.cc
EXTRA_LINK_LIBS
${ARROW_GTEST_GMOCK})

add_arrow_compute_test(expression_test SOURCES expression_test.cc)

Expand Down
3 changes: 2 additions & 1 deletion cpp/src/arrow/compute/kernels/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ if(ARROW_TESTING)
add_library(arrow_compute_kernels_testing OBJECT test_util.cc)
# Even though this is still just an object library we still need to "link" our
# dependencies so that include paths are configured correctly
target_link_libraries(arrow_compute_kernels_testing ${ARROW_GTEST_GTEST})
target_link_libraries(arrow_compute_kernels_testing ${ARROW_GTEST_GTEST}
${ARROW_GTEST_GMOCK})
endif()

add_arrow_test(scalar_cast_test
Expand Down

0 comments on commit d47cfbc

Please sign in to comment.