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
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
FindComputeCpp.cmake MIsc. source and comment typos 2018-03-11 10:01:44 -04:00
FindEigen2.cmake
FindEigen3.cmake FindEigen3: Set Eigen3_FOUND variable 2018-07-11 16:31:50 +02:00
FindFFTW.cmake
FindGLEW.cmake
FindGMP.cmake
FindGoogleHash.cmake
FindGSL.cmake
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
FindMetis.cmake Improve cmake scripts for Pastix and BLAS detection. 2017-04-14 10:22:12 +02:00
FindMPFR.cmake
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
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
UseEigen3.cmake