Skip to content

Commit

Permalink
chore: Fall back on shared libzstd if libzstd_static is not available (
Browse files Browse the repository at this point in the history
…#704)

This PR updates the CMake such that it works in conda after a `conda
install zstd` (which doesn't provide `libzstd_static`, but does provide
`libzstd`). This is needed to unskip the integration tests for zstd
because the integration image uses conda (
apache/arrow#45205 ).

Previous commits tested apache/arrow#45205 by
specifically pulling that branch instead of apache/arrow. When zstd is
installed...the tests pass!
  • Loading branch information
paleolimbot authored Jan 9, 2025
1 parent ec67a72 commit 4bf5a93
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,14 @@ if(NANOARROW_IPC)
if(NANOARROW_IPC_WITH_ZSTD)
find_package(zstd REQUIRED)
set(NANOARROW_IPC_EXTRA_FLAGS "-DNANOARROW_IPC_WITH_ZSTD")
set(NANOARROW_IPC_EXTRA_LIBS zstd::libzstd_static)

# libzstd_static is not available from conda
# This could be configurable if shared zstd is a must
if(TARGET zstd::libzstd_static)
set(NANOARROW_IPC_EXTRA_LIBS zstd::libzstd_static)
else()
set(NANOARROW_IPC_EXTRA_LIBS zstd::libzstd)
endif()
endif()

if(NOT NANOARROW_BUNDLE)
Expand Down

0 comments on commit 4bf5a93

Please sign in to comment.