Skip to content

Commit

Permalink
build: Remove unused libparquet targets from arrow CMake (#11987)
Browse files Browse the repository at this point in the history
Summary: Pull Request resolved: #11987

Reviewed By: Yuhta, pedroerp

Differential Revision: D67910242

Pulled By: kevinwilfong

fbshipit-source-id: a7b4802cbf8f222d9379998a02f3ba7f7b01538f
  • Loading branch information
majetideepak authored and facebook-github-bot committed Jan 8, 2025
1 parent 1442bd5 commit 8694db5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 12 deletions.
7 changes: 2 additions & 5 deletions CMake/FindArrow.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
# limitations under the License.

find_library(ARROW_LIB libarrow.a)
find_library(PARQUET_LIB libparquet.a)
find_library(ARROW_TESTING_LIB libarrow_testing.a)
if("${ARROW_LIB}" STREQUAL "ARROW_LIB-NOTFOUND"
OR "${ARROW_TESTING_LIB}" STREQUAL "ARROW_TESTING_LIB-NOTFOUND")
Expand All @@ -33,16 +32,14 @@ set(Arrow_FOUND true)
# Only add the libraries once.
if(NOT TARGET arrow)
add_library(arrow STATIC IMPORTED GLOBAL)
add_library(parquet STATIC IMPORTED GLOBAL)
add_library(arrow_testing STATIC IMPORTED GLOBAL)

find_path(ARROW_INCLUDE_PATH arrow/api.h)
set_target_properties(
arrow arrow_testing parquet PROPERTIES INTERFACE_INCLUDE_DIRECTORIES
${ARROW_INCLUDE_PATH})
arrow arrow_testing PROPERTIES INTERFACE_INCLUDE_DIRECTORIES
${ARROW_INCLUDE_PATH})
set_target_properties(arrow PROPERTIES IMPORTED_LOCATION ${ARROW_LIB}
INTERFACE_LINK_LIBRARIES thrift)
set_target_properties(parquet PROPERTIES IMPORTED_LOCATION ${PARQUET_LIB})
set_target_properties(arrow_testing PROPERTIES IMPORTED_LOCATION
${ARROW_TESTING_LIB})
endif()
10 changes: 3 additions & 7 deletions CMake/resolve_dependency_modules/arrow/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -71,27 +71,23 @@ if(VELOX_ENABLE_ARROW)
URL_HASH ${VELOX_ARROW_BUILD_SHA256_CHECKSUM}
SOURCE_SUBDIR cpp
CMAKE_ARGS ${ARROW_CMAKE_ARGS}
BUILD_BYPRODUCTS ${ARROW_LIBDIR}/libarrow.a ${ARROW_LIBDIR}/libparquet.a
BUILD_BYPRODUCTS ${ARROW_LIBDIR}/libarrow.a
${ARROW_LIBDIR}/libarrow_testing.a ${THRIFT_LIB}
PATCH_COMMAND git apply ${CMAKE_CURRENT_LIST_DIR}/thrift-download.patch)

add_library(arrow STATIC IMPORTED GLOBAL)
add_library(arrow_testing STATIC IMPORTED GLOBAL)
add_library(parquet STATIC IMPORTED GLOBAL)
add_dependencies(arrow arrow_ep)
add_dependencies(arrow_testing arrow)
add_dependencies(parquet arrow)
file(MAKE_DIRECTORY ${ARROW_PREFIX}/install/include)
set_target_properties(
arrow arrow_testing parquet PROPERTIES INTERFACE_INCLUDE_DIRECTORIES
${ARROW_PREFIX}/install/include)
arrow arrow_testing PROPERTIES INTERFACE_INCLUDE_DIRECTORIES
${ARROW_PREFIX}/install/include)
set_target_properties(arrow PROPERTIES IMPORTED_LOCATION
${ARROW_LIBDIR}/libarrow.a)
set_property(TARGET arrow PROPERTY INTERFACE_LINK_LIBRARIES ${RE2} thrift)
set_target_properties(
arrow_testing PROPERTIES IMPORTED_LOCATION
${ARROW_LIBDIR}/libarrow_testing.a)
set_target_properties(parquet PROPERTIES IMPORTED_LOCATION
${ARROW_LIBDIR}/libparquet.a)

endif()

0 comments on commit 8694db5

Please sign in to comment.