Skip to content

Commit

Permalink
find_package(cudf) + arrow9 usable with cudf build directory (NVIDIA#…
Browse files Browse the repository at this point in the history
…11535)

arrow 9's CMake code generates new imported interface targets which cudf needs to replicate so that consumers of cudf don't get errors abount `arrow::hadoop` or `arrow::flatbuffers`.

Fixes NVIDIA#11521

Authors:
  - Robert Maynard (https://github.com/robertmaynard)

Approvers:
  - Jason Lowe (https://github.com/jlowe)
  - Bradley Dice (https://github.com/bdice)

URL: rapidsai/cudf#11535
  • Loading branch information
robertmaynard authored Aug 15, 2022
1 parent dd0ff30 commit 2e72db1
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions cpp/cmake/thirdparty/get_arrow.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ function(find_and_configure_arrow VERSION BUILD_STATIC ENABLE_S3 ENABLE_ORC ENAB
"ARROW_SIMD_LEVEL ${ARROW_SIMD_LEVEL}"
"ARROW_BUILD_STATIC ${ARROW_BUILD_STATIC}"
"ARROW_BUILD_SHARED ${ARROW_BUILD_SHARED}"
"ARROW_POSITION_INDEPENDENT_CODE ON"
"ARROW_DEPENDENCY_USE_SHARED ${ARROW_BUILD_SHARED}"
"ARROW_BOOST_USE_SHARED ${ARROW_BUILD_SHARED}"
"ARROW_BROTLI_USE_SHARED ${ARROW_BUILD_SHARED}"
Expand Down Expand Up @@ -192,8 +193,38 @@ function(find_and_configure_arrow VERSION BUILD_STATIC ENABLE_S3 ENABLE_ORC ENAB
if (TARGET cudf::arrow_static AND (NOT TARGET arrow_static))
add_library(arrow_static ALIAS cudf::arrow_static)
endif()
if (NOT TARGET arrow::flatbuffers)
add_library(arrow::flatbuffers INTERFACE IMPORTED)
endif()
if (NOT TARGET arrow::hadoop)
add_library(arrow::hadoop INTERFACE IMPORTED)
endif()
]=]
)
if(ENABLE_PARQUET)
string(
APPEND
arrow_code_string
"
find_package(Boost)
if (NOT TARGET Boost::headers)
add_library(Boost::headers INTERFACE IMPORTED)
endif()
"
)
endif()
if(NOT TARGET xsimd)
string(
APPEND
arrow_code_string
"
if(NOT TARGET xsimd)
add_library(xsimd INTERFACE IMPORTED)
target_include_directories(xsimd INTERFACE \"${Arrow_BINARY_DIR}/xsimd_ep/src/xsimd_ep-install/include\")
endif()
"
)
endif()

rapids_export(
BUILD Arrow
Expand Down

0 comments on commit 2e72db1

Please sign in to comment.