CMake fixes for Eigen3 5.0.0 #335
Open
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.
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:
EIGEN3_FOUNDvariable instead of theEigen3_FOUNDvariable actually set byfind_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-inFindEigen3.cmakedoes not work anymore fine for Eigen3 >= 5.0.0, so avoiding that is invoked if not necessary is important.EIGEN3_VERSION_STRINGandEIGEN3_INCLUDE_DIRSCMake 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.0As a related note, I think all non-EOL distributions of Eigen actually ship a well formed
Eigen3Config.cmakefile, so it could make sense to drop the internalFindEigen3.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