eigen/cmake
Jean-Christophe Fillion-Robin 2cbd9dd498 [PATCH] cmake: Support source include with add_subdirectory and
find_package use
This commit allows the sources of the project to be included in a parent
project CMakeLists.txt and support use of "find_package(Eigen3 CONFIG REQUIRED)"

Here is an example allowing to test the changes. It is not particularly
useful in itself. This change will allow to support one of the scenario
allowing to create custom 3D Slicer application bundling associated plugins.

/tmp/eigen-git-mirror  # Eigen sources

/tmp/test/CMakeLists.txt:

  cmake_minimum_required(VERSION 3.12)
  project(test)
  add_subdirectory("/tmp/eigen-git-mirror" "eigen-git-mirror")
  find_package(Eigen3 CONFIG REQUIRED)

and configuring it using:

  mkdir /tmp/test-build && cd $_
  cmake \
    -DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY:BOOL=1 \
    -DEigen3_DIR:PATH=/tmp/test-build/eigen-git-mirror \
    /tmp/test

Co-authored-by: Pablo Hernandez <pablo.hernandez@kitware.com>
---
 CMakeLists.txt              | 1 +
 cmake/Eigen3Config.cmake.in | 4 +++-
 2 files changed, 4 insertions(+), 1 deletion(-)
2018-09-07 15:50:19 -04:00
..
Eigen3Config.cmake.in [PATCH] cmake: Support source include with add_subdirectory and 2018-09-07 15:50:19 -04:00
Eigen3ConfigLegacy.cmake.in Added relocatable cmake support also for CMake before 3.0 and after 2.8.8 2016-12-06 10:37:34 +01:00
EigenConfigureTesting.cmake Allow to filter out build-error messages 2018-07-24 20:12:49 +02:00
EigenDetermineOSVersion.cmake Fix cross-compiling windows version detection 2016-04-04 11:47:46 +02:00
EigenDetermineVSServicePack.cmake Fallback to CMAKE_CXX_COMPILER_VERSION if VS version unknown 2015-06-24 15:17:37 +02:00
EigenTesting.cmake Get rid of EIGEN_TEST_FUNC, unit tests must now be declared with EIGEN_DECLARE_TEST(mytest) { /* code */ }. 2018-07-17 14:46:15 +02:00
EigenUninstall.cmake Added cmake uninstall target. 2014-12-04 02:57:03 -05:00
FindAdolc.cmake Make sure ADOLC is recent enough by searching for adtl.h 2015-12-10 22:23:21 +01:00
FindBLAS.cmake Make sure CMAKE_Fortran_COMPILER is set before checking for Fortran functions 2017-06-20 16:58:03 +02:00
FindBLASEXT.cmake Improve cmake scripts for Pastix and BLAS detection. 2017-04-14 10:22:12 +02:00
FindCholmod.cmake Determine version of Metis library. Apparently, at least version 5.x is needed for Eigen/MetisSupport. 2014-07-09 16:54:15 +02:00
FindComputeCpp.cmake MIsc. source and comment typos 2018-03-11 10:01:44 -04:00
FindEigen2.cmake do not confuse Eigen3 or beta versions of Eigen3 with Eigen2 2011-03-23 16:58:45 +01:00
FindEigen3.cmake FindEigen3: Set Eigen3_FOUND variable 2018-07-11 16:31:50 +02:00
FindFFTW.cmake Determine version of Metis library. Apparently, at least version 5.x is needed for Eigen/MetisSupport. 2014-07-09 16:54:15 +02:00
FindGLEW.cmake add support for uniforms 2010-10-12 10:39:28 +02:00
FindGMP.cmake add a support module for MPFR C++ with basic unit testing 2010-07-15 16:29:04 +02:00
FindGoogleHash.cmake add a compilation test in FindGoogleHash.cmake to catch configuration 2009-01-19 08:51:06 +00:00
FindGSL.cmake Enable GSL tests (reverts part of changeset 6628534eb5 2010-12-29 17:45:18 +00:00
FindHWLOC.cmake Improve cmake scripts for Pastix and BLAS detection. 2017-04-14 10:22:12 +02:00
FindKLU.cmake KLU depends on BTF but not on libSuiteSparse nor Cholmod 2017-11-10 13:58:52 +01:00
FindLAPACK.cmake add custom FindBLAS FindLAPACK working for c++ compiler 2009-02-05 09:36:52 +00:00
FindMetis.cmake Improve cmake scripts for Pastix and BLAS detection. 2017-04-14 10:22:12 +02:00
FindMPFR.cmake Require at least MPFR version 2.3.0, because we use mpfr_signbit. 2010-07-19 12:26:52 +01:00
FindPastix.cmake Improve cmake scripts for Pastix and BLAS detection. 2017-04-14 10:22:12 +02:00
FindPTSCOTCH.cmake Improve cmake scripts for Pastix and BLAS detection. 2017-04-14 10:22:12 +02:00
FindScotch.cmake Improve cmake scripts for Pastix and BLAS detection. 2017-04-14 10:22:12 +02:00
FindSPQR.cmake SPQR and UmfPack need to link to cholmod. 2015-11-05 12:05:02 +01:00
FindStandardMathLibrary.cmake add platform check for how to link to the standard math library. 2010-04-19 11:19:22 -04:00
FindSuperLU.cmake bug #1119: Adjust call to ?gssvx for SuperLU 5 2016-07-10 02:29:57 +02:00
FindTriSYCL.cmake Add cmake file FindTriSYCL.cmake 2017-05-17 17:59:30 +01:00
FindUmfpack.cmake SPQR and UmfPack need to link to cholmod. 2015-11-05 12:05:02 +01:00
FindXsmm.cmake Automatically include and link libxsmm when present. 2016-12-21 13:44:59 -08:00
language_support.cmake Fix cmake scripts with no fortran compiler 2018-04-07 08:45:19 +02:00
RegexUtils.cmake Improves the filter for hidden files in "Eigen" and "Eigen/src". 2010-11-22 10:47:07 -05:00
UseEigen3.cmake Add cmake config files 2013-10-09 10:25:50 +02:00