Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle FindEigen3 module's differing definitions #75

Merged
merged 1 commit into from
Jan 15, 2021
Merged

Handle FindEigen3 module's differing definitions #75

merged 1 commit into from
Jan 15, 2021

Conversation

cottsay
Copy link

@cottsay cottsay commented Dec 18, 2020

The FindEigen3.cmake CMake module sets EIGEN3_INCLUDE_DIR instead of EIGEN3_INCLUDE_DIRS. At the moment, Ubuntu only includes the Eigen3Config.cmake config, while Fedora includes both files. CMake appears to give precedence to the module over the config, so the config never gets processed.

Alternatively, we could pass NO_MODULE to the find_package call, but this would fail on systems that ONLY have the module, though I'm not aware of any such distributions.

A similar change was applied to rviz2.

In the current code, even when Eigen3Config.cmake is used and EIGEN3_INCLUDE_DIR is referenced, a build warning comes out of catkin:

CMake Warning at install/share/catkin/cmake/catkin_package.cmake:166 (message):
  catkin_package() DEPENDS on 'EIGEN3' but neither 'EIGEN3_INCLUDE_DIRS' nor
  'EIGEN3_LIBRARIES' is defined.
Call Stack (most recent call first):
  install/share/catkin/cmake/catkin_package.cmake:102 (_catkin_package)
  CMakeLists.txt:23 (catkin_package)

This change should also resolve that warning.

The `FindEigen3.cmake` CMake module sets `EIGEN3_INCLUDE_DIR` instead of
`EIGEN3_INCLUDE_DIRS`. At the moment, Ubuntu only includes the
`Eigen3Config.cmake` config, while Fedora includes both files. CMake
appears to give precedence to the module over the config, so the config
never gets processed.

Alternatively, we could pass `NO_MODULE` to the `find_package` call, but
this would fail on systems that ONLY have the module, though I'm not
aware of any such distributions.
@mabelzhang mabelzhang merged commit afc3349 into ros-perception:kinetic-devel Jan 15, 2021
@cottsay cottsay deleted the cottsay/eigen3 branch January 15, 2021 00:04
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.

2 participants