This bugzilla service is closed. All entries have been migrated to https://gitlab.com/libeigen/eigen

Bug 773

Summary: Provide eigen-config.cmake
Product: Eigen Reporter: Charles Karney <charles>
Component: Core - generalAssignee: Nobody <eigen.nobody>
Status: NEW ---    
Severity: enhancement CC: gael.guennebaud, jacob.benoit.1
Priority: Normal    
Version: 3.2   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
eigen-cmake-config.patch none

Description Charles Karney 2014-03-24 20:32:17 UTC
Created attachment 441 [details]
eigen-cmake-config.patch

The attached patch provides support for the cmake command

  find_package (Eigen 3.2)

via eigen-config.cmake and eigen-config-version.cmake.  This will be
able to find Eigen either in the build tree (after "cmake SOURCE_DIR")
or in the install tree (after "make install").  It sets Eigen_FOUND,
Eigen_VERSION, and Eigen_INCLUDE_DIRS.  This is a "config-style" lookup.
If a user has a FindEigen.cmake in his path he might need to specify
NO_MODULE.
Comment 1 Charles Karney 2014-03-25 21:15:00 UTC
The version matching rules implemented in eigen-config-version.cmake are

find_package(Eigen 3) matches 3.* but not 2.* or 4.*
find_package(Eigen 3.0) matches 3.* but not 2.* or 4.*
find_package(Eigen 3.1) matches 3.1.*, 3.2.* but not 3.0.* or 4.*
find_package(Eigen 3.2.1) matches 3.2.1, 3.2.2, 3.3.0 but not 3.2.0 or 4.*

This assumes a version acceptable if the first version number matches
and the version is greater or equal to the requested version.

Perhaps the following rules would match more closely how versioning
works with Eigen

find_package(Eigen 3) matches 3.* only
find_package(Eigen 3.0) matches 3.0.* only
find_package(Eigen 3.2) matches 3.2.* only
find_package(Eigen 3.2.1) matches 3.2.n for n>=1 but not 3.2.0 or 3.3.*

I can easily modify the version checking to implement this.  Let me know.
Comment 2 Nobody 2019-12-04 13:08:39 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to gitlab.com'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: https://gitlab.com/libeigen/eigen/issues/773.