Skip to content

Conversation

@traversaro
Copy link
Contributor

@traversaro traversaro commented Oct 6, 2025

Hello @artivis, I hope everything is fine!

Eigen3 5.0.0 was recently released, and this PR fixes the CMake logic of manif to permit to use it out of the box, with the following modifications:

  • The current logic of "trying to find Eigen with a CMake Config and then fallback to the built-in FindEigen3.cmake module" was actually broken, as it checked for EIGEN3_FOUND variable instead of the Eigen3_FOUND variable actually set by find_package(Eigen3 QUIET) . However, this was never a problem as the built-in module worked fine for Eigen3 versions <= 3.4.0. However, now the built-in FindEigen3.cmake does not work anymore fine for Eigen3 >= 5.0.0, so avoiding that is invoked if not necessary is important.
  • Eigen3 5.0.0 does not define anymore EIGEN3_VERSION_STRING and EIGEN3_INCLUDE_DIRS CMake variables, see https://github.com/eigen-mirror/eigen/blob/5.0.0/cmake/Eigen3Config.cmake.in vs https://github.com/eigen-mirror/eigen/blob/3.4.1/cmake/Eigen3Config.cmake.in . Fortunately, such variables were just used to check if the Eigen3 version was either ==3.3.6 or <=3.3.8, and those are checks we can avoid if we know that Eigen3>=5.0.0

As a related note, I think all non-EOL distributions of Eigen actually ship a well formed Eigen3Config.cmake file, so it could make sense to drop the internal FindEigen3.cmake, but that is not strictly related to this PR.

xref: robotology/robotology-superbuild#1902
xref: robotology/robotology-superbuild#1903
xref: conda-forge/eigen-feedstock#47

@traversaro
Copy link
Contributor Author

The CI failure is not related to this PR, it is an upstream vcpkg issue tracked in microsoft/vcpkg#47599 that will be fixed by microsoft/vcpkg#47620 .

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant