Skip to content

ENH: Support building with system Eigen3 >= 5#5590

Merged
phcerdan merged 1 commit into
InsightSoftwareConsortium:mainfrom
cho-m:system-eigen-5
Nov 4, 2025
Merged

ENH: Support building with system Eigen3 >= 5#5590
phcerdan merged 1 commit into
InsightSoftwareConsortium:mainfrom
cho-m:system-eigen-5

Conversation

@cho-m

@cho-m cho-m commented Nov 2, 2025

Copy link
Copy Markdown
Contributor

Eigen3 changed their version scheme in 5.0.0 to exclude the world version1 which makes CMake see it as an incompatible major version. To allow newer versions, perform an unversioned find_package and follow up with a version check.


Only handles system Eigen as was looking into this for Homebrew (Homebrew/homebrew-core#246477).

PR Checklist

  • No API changes were made (or the changes have been approved)
  • No major design changes were made (or the changes have been approved)
  • Added test (or behavior not changed)
  • Updated API documentation (or API not changed)
  • Added license to new files (if any)
  • Added Python wrapping to new files (if any) as described in ITK Software Guide Section 9.5
  • Added ITK examples for all new major features (if any)

Refer to the ITK Software Guide for
further development details if necessary.

Footnotes

  1. https://gitlab.com/libeigen/eigen/-/releases/5.0.0#versioning

Eigen3 changed their version scheme in 5.0.0 to exclude the world
version[^1] which makes CMake see it as an incompatible major version.
To allow newer versions, perform an unversioned find_package and follow
up with a version check.

[^1]: https://gitlab.com/libeigen/eigen/-/releases/5.0.0#versioning
@github-actions github-actions Bot added type:Infrastructure Infrastructure/ecosystem related changes, such as CMake or buildbots type:Enhancement Improvement of existing methods or implementation area:ThirdParty Issues affecting the ThirdParty module labels Nov 2, 2025

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Thank you for contributing a pull request! 🙏

Welcome to the ITK community! 🤗👋☀️

We are glad you are here and appreciate your contribution. Please keep in mind our community participation guidelines. 📜
More support and guidance on the contribution process can be found in our contributing guide. 📖

This is an automatic message. Allow for time for the ITK community to be able to read the pull request and comment
on it.

@thewtex thewtex requested a review from phcerdan November 3, 2025 01:28

@dzenanz dzenanz 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.

Looks good on a glance. I would like to leave decision to Pablo.

@phcerdan phcerdan merged commit 6529cb9 into InsightSoftwareConsortium:main Nov 4, 2025
17 checks passed
@phcerdan

phcerdan commented Nov 4, 2025

Copy link
Copy Markdown
Contributor

Thanks @cho-m

@thewtex

thewtex commented Nov 4, 2025

Copy link
Copy Markdown
Member

Backported to release-5.4

hjmjohnson pushed a commit to hjmjohnson/ITK that referenced this pull request May 6, 2026
hjmjohnson pushed a commit to hjmjohnson/ITK that referenced this pull request May 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:ThirdParty Issues affecting the ThirdParty module type:Enhancement Improvement of existing methods or implementation type:Infrastructure Infrastructure/ecosystem related changes, such as CMake or buildbots

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants