This bugzilla service is closed. All entries have been migrated to

Bug 1386

Summary: Eigen3Config.cmake does not register correct file in CMake User Package registry
Product: Eigen Reporter: Dominic Kempf <dominic.kempf>
Component: GeneralAssignee: Nobody <eigen.nobody>
Status: CONFIRMED ---    
Severity: Unknown CC: chtz, cld72, dominic.kempf, gael.guennebaud, jacob.benoit.1
Priority: Normal    
Version: 3.3 (current stable)   
Hardware: All   
OS: Linux   

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:
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

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”: 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:

But I'm not really a CMake expert, so I have no idea, whether one should or should not do:
  export (PACKAGE Eigen3)
Comment 4 Nobody 2019-12-04 16:46:20 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: