New user self-registration is currently disabled. Please email eigen-core-team @ lists.tuxfamily.org if you need an account.
Bug 1375 - Eigen3ConfigVersion.cmake is not installed along with Eigen3Config.cmake with cmake v2.8
Eigen3ConfigVersion.cmake is not installed along with Eigen3Config.cmake with...
Status: RESOLVED FIXED
Product: Eigen
Classification: Unclassified
Component: General
3.3 (current stable)
All All
: Normal Wrong Result
Assigned To: Nobody
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2017-01-18 00:49 UTC by Erik Hovland
Modified: 2017-01-24 08:18 UTC (History)
3 users (show)



Attachments
Writes and installs Eigen3ConfigVersion.cmake even if cmake version 2.8 is used. (1.34 KB, patch)
2017-01-18 00:49 UTC, Erik Hovland
no flags Details | Diff

Description Erik Hovland 2017-01-18 00:49:58 UTC
Created attachment 765 [details]
Writes and installs Eigen3ConfigVersion.cmake even if cmake version 2.8 is used.

When using cmake to install eigen, eigen installs Eigen3Config.cmake, Eigen3ConfigVersion.cmake and UseEigen3.cmake if the cmake used is newer or equal to cmake 3.0. If the cmake is older (my installed version is 2.8.12), the Eigen3ConfigVersion.cmake file is not installed.

If this is the case and the project that depends on eigen tries to use FindEigen3.cmake, the cmake process will complain about how the Eigen3Config.cmake file was found, but cmake cannot determine the version:
CMake Warning at cmake/FindEigen3.cmake:73 (find_package):
  Could not find a configuration file for package "Eigen3" that is compatible
  with requested version "3.1".

  The following configuration files were considered but not accepted:

    /work/ehovland/ub/local/share/eigen3/cmake/Eigen3Config.cmake, version: unknown

This is because the CMakeLists.txt for eigen has special logic for any cmake older than 3.0 when building the Eigen3Config.cmake file and does not have write_basic_package_version_file() inside of the conditional for cmake versions older than 3.0 like it does for 3.0 or newer versions.
Comment 1 Gael Guennebaud 2017-01-24 08:18:22 UTC
Thank you for the patch, I reworked it a bit:

devel: https://bitbucket.org/eigen/eigen/commits/737f257bb23d/
3.2:   https://bitbucket.org/eigen/eigen/commits/1072033baf62/

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