New user self-registration is disabled due to spam. Please email eigen-core-team @ lists.tuxfamily.org if you need an account.
Before reporting a bug, please make sure that your Eigen version is up-to-date!
Bug 1386 - Eigen3Config.cmake does not register correct file in CMake User Package registry
Summary: Eigen3Config.cmake does not register correct file in CMake User Package registry
Status: CONFIRMED
Alias: None
Product: Eigen
Classification: Unclassified
Component: General (show other bugs)
Version: 3.3 (current stable)
Hardware: All Linux
: Normal Unknown
Assignee: Nobody
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-30 12:39 UTC by Dominic Kempf
Modified: 2018-04-17 13:52 UTC (History)
5 users (show)



Attachments

Description Dominic Kempf 2017-01-30 12:39:38 UTC
Eigen3 makes use of the cmake user package registry through the cmake command "export(PACKAGE ...)". This command registers the Eigen3Config.cmake from *the build tree*. However, the relative paths currently used in this config file are designed to be correct within *the installation tree structure*. This results in CMake finding Eigen3 form downstream packages, but use incorrect include paths.

Note, that the behaviour was explicitly changed to relative paths in #1347.
Comment 1 Gael Guennebaud 2017-01-30 14:21:27 UTC
Some bits of discussions there: https://bitbucket.org/eigen/eigen/commits/52399ea56fa9e936bd936e47c8a356265ecbfa92#LCMakeLists.txtT545
Comment 2 Chris Dembia 2017-02-13 16:57:10 UTC
I will try to submit a PR on bitbucket to address this bug. Here is what I said in an email to eigen-core-team@lists.tuxfamily.org:

I believe the issue is that the build directory has an Eigen3Config.cmake file in it; the configured file in the build directory should be named something else so that CMake does not pick it up. For example, in my project, we name the configured build-directory file “OpenSimConfigToInstall.cmake”: https://github.com/opensim-org/opensim-core/blob/master/cmake/CMakeLists.txt#L12. This resolved the issue for us.
Comment 3 Christoph Hertzberg 2018-04-17 13:52:03 UTC
I recently ran into this as well, when a library used
  find_package(Eigen3 3.0.5 QUIET CONFIG)
and accidentally picked up a local Eigen3Config.cmake from a version which had some experimental (not yet working) changes.

In my eyes this PR is good:
https://bitbucket.org/eigen/eigen/pull-requests/299/

But I'm not really a CMake expert, so I have no idea, whether one should or should not do:
  export (PACKAGE Eigen3)

Note You need to log in before you can comment on or make changes to this bug.