Skip to content

GH-50222: [C++] Use FetchContent for xsimd - #50303

Merged
raulcd merged 2 commits into
apache:mainfrom
AntoinePrv:fetchcontent-xsimd
Jul 6, 2026
Merged

raulcd merged 2 commits into
apache:mainfrom
AntoinePrv:fetchcontent-xsimd

Conversation

@AntoinePrv

@AntoinePrv AntoinePrv commented Jun 30, 2026 •

Copy link
Copy Markdown
Collaborator

Rationale for this change

FetchContent suggested as better approach in GH-45303.

What changes are included in this PR?

Use FetchContent for xsimd and solve a bug where xsimd is not available at configure time.

Are these changes tested?

Yes, locally.

Are there any user-facing changes?

No.

Copilot AI review requested due to automatic review settings June 30, 2026 09:46
@github-actions

Copy link
Copy Markdown

⚠️ GitHub issue #50222 has been automatically assigned in GitHub to PR creator.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates Arrow C++’s third-party toolchain to vendor xsimd via CMake FetchContent, addressing cases where Arrow itself is consumed via FetchContent and xsimd headers need to be available during configuration.

Changes:

  • Replaces the previous ExternalProject_Add()-based xsimd build with FetchContent (fetchcontent_declare / fetchcontent_makeavailable).
  • Introduces an arrow::xsimd imported INTERFACE target that points at the fetched source include directory.
  • Converts build_xsimd from a macro to a function and propagates key variables to the parent scope.

@AntoinePrv
AntoinePrv force-pushed the fetchcontent-xsimd branch from d2a08ea to fd44d07 Compare June 30, 2026 10:10
@raulcd raulcd added CI: Extra: C++ Run extra C++ CI CI: Extra: Package: Linux Run extra Linux Packages CI labels Jun 30, 2026

@raulcd raulcd left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, I am triggering the extra checks for Package Linux jobs to validate extra CI. If green I'll merge.

@raulcd

raulcd commented Jul 6, 2026 •

Copy link
Copy Markdown
Member

The failures on Almalinux-8 and Amazon Linux 2023 are related. I think we've solved the same issue in the past with something like:

  if(CMAKE_VERSION VERSION_LESS 3.28)
    set_property(DIRECTORY ${xsimd_SOURCE_DIR} PROPERTY EXCLUDE_FROM_ALL TRUE)
  endif()

See resolved comment on the PR here:
#50006 (comment)

Copilot AI review requested due to automatic review settings July 6, 2026 12:30
@AntoinePrv
AntoinePrv force-pushed the fetchcontent-xsimd branch from fd44d07 to 2027caf Compare July 6, 2026 12:30

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

@raulcd
raulcd merged commit 9f55c8d into apache:main Jul 6, 2026
102 of 105 checks passed
@AntoinePrv
AntoinePrv deleted the fetchcontent-xsimd branch July 6, 2026 15:06
@conbench-apache-arrow

Copy link
Copy Markdown

After merging your PR, Conbench analyzed the 4 benchmarking runs that have been run so far on merge-commit 9f55c8d.

There were no benchmark performance regressions. 🎉

The full Conbench report has more details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI: Extra: C++ Run extra C++ CI CI: Extra: Package: Linux Run extra Linux Packages CI Component: C++

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants