From 2defde30e4c61cd9f33196b91ac16505928ce774 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Wed, 15 Oct 2025 15:46:22 +0800 Subject: [PATCH] cmake/BuildArrow: Use AUTO mode for xsimd dependency detection MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Arrow requires xsimd >= 9.0.1 according to arrow/cpp/thirdparty/versions.txt. Previously, we unconditionally set -Dxsimd_SOURCE=BUNDLED, forcing the use of Arrow's vendored xsimd regardless of system package availability. This commit changes to -Dxsimd_SOURCE=AUTO, which allows Arrow's resolve_dependency mechanism to automatically: 1. Try to find system xsimd package 2. Check if version >= 9.0.1 3. Use system version if found and sufficient 4. Fall back to bundled version otherwise This reduces build time and dependencies on systems with sufficient xsimd, while maintaining compatibility with older distributions. Distribution availability: - Ubuntu Noble (24.04): libxsimd-dev 12.1.1 (✓ will use system) - Ubuntu Jammy (22.04): libxsimd-dev 7.6.0 (✗ will use bundled) - Debian Trixie (13): libxsimd-dev 13.2.0 (✓ will use system) - CentOS Stream 9: xsimd-devel 7.4.9 (✗ will use bundled) Signed-off-by: Kefu Chai --- cmake/modules/BuildArrow.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmake/modules/BuildArrow.cmake b/cmake/modules/BuildArrow.cmake index 0ee1d85b49f..cadc2909fa4 100644 --- a/cmake/modules/BuildArrow.cmake +++ b/cmake/modules/BuildArrow.cmake @@ -69,9 +69,9 @@ function(build_arrow) list(APPEND arrow_DEPENDS Boost) endif() - # since Arrow 15.0.0 needs xsimd>=8.1.0 and since Ubuntu Jammy - # Jellyfish only provides 7.6.0, we'll have arrow build it as source - list(APPEND arrow_CMAKE_ARGS -Dxsimd_SOURCE=BUNDLED) + # Arrow requires xsimd >= 9.0.1 (see arrow/cpp/thirdparty/versions.txt). + # Use AUTO to let Arrow detect system xsimd and fall back to bundled if needed. + list(APPEND arrow_CMAKE_ARGS -Dxsimd_SOURCE=AUTO) # cmake doesn't properly handle arguments containing ";", such as # CMAKE_PREFIX_PATH, for which reason we'll have to use some other separator. -- 2.39.5