Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not exclude nanoarrow and flatbuffers from installation if statically linked #17322

Merged
Merged
Show file tree
Hide file tree
Changes from 4 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
8 changes: 7 additions & 1 deletion cpp/cmake/thirdparty/get_flatbuffers.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,20 @@
# Use CPM to find or clone flatbuffers
function(find_and_configure_flatbuffers VERSION)

if (NOT BUILD_SHARED_LIBS)
set(_exclude_from_all "EXCLUDE_FROM_ALL FALSE")
else()
set(_exclude_from_all "EXCLUDE_FROM_ALL TRUE")
endif()

rapids_cpm_find(
flatbuffers ${VERSION}
GLOBAL_TARGETS flatbuffers
CPM_ARGS
GIT_REPOSITORY https://github.com/google/flatbuffers.git
GIT_TAG v${VERSION}
GIT_SHALLOW TRUE
EXCLUDE_FROM_ALL TRUE
${_exclude_from_all}
)

rapids_export_find_package_root(
Expand Down
8 changes: 7 additions & 1 deletion cpp/cmake/thirdparty/get_nanoarrow.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,20 @@ function(find_and_configure_nanoarrow)
set(cudf_patch_dir "${CMAKE_CURRENT_FUNCTION_LIST_DIR}/patches")
rapids_cpm_package_override("${cudf_patch_dir}/nanoarrow_override.json")

if (NOT BUILD_SHARED_LIBS)
set(_exclude_from_all "EXCLUDE_FROM_ALL FALSE")
else()
set(_exclude_from_all "EXCLUDE_FROM_ALL TRUE")
endif()

# Currently we need to always build nanoarrow so we don't pickup a previous installed version
set(CPM_DOWNLOAD_nanoarrow ON)
rapids_cpm_find(
nanoarrow 0.6.0.dev
GLOBAL_TARGETS nanoarrow
CPM_ARGS
OPTIONS "BUILD_SHARED_LIBS OFF" "NANOARROW_NAMESPACE cudf"
EXCLUDE_FROM_ALL TRUE
${_exclude_from_all}
)
set_target_properties(nanoarrow PROPERTIES POSITION_INDEPENDENT_CODE ON)
rapids_export_find_package_root(BUILD nanoarrow "${nanoarrow_BINARY_DIR}" EXPORT_SET cudf-exports)
Expand Down
Loading