ENH: Support building with system Eigen3 >= 5#5590
Merged
Conversation
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
There was a problem hiding this comment.
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.
dzenanz
reviewed
Nov 3, 2025
dzenanz
left a comment
Member
There was a problem hiding this comment.
Looks good on a glance. I would like to leave decision to Pablo.
phcerdan
approved these changes
Nov 4, 2025
Contributor
|
Thanks @cho-m |
Member
|
Backported to |
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
Refer to the ITK Software Guide for
further development details if necessary.
Footnotes
https://gitlab.com/libeigen/eigen/-/releases/5.0.0#versioning ↩