cmake: more strictly enforce finding the included eigen version
This commit is contained in:
parent
fa91beed17
commit
ef8f5e40bd
|
@ -167,7 +167,7 @@ set(CMAKE_CXX_FLAGS "${BASALT_CXX_FLAGS} -march=${CXX_MARCH} ${BASALT_PASSED_CXX
|
||||||
|
|
||||||
|
|
||||||
set(EIGEN_INCLUDE_DIR_HINTS ${EIGEN_ROOT})
|
set(EIGEN_INCLUDE_DIR_HINTS ${EIGEN_ROOT})
|
||||||
find_package(Eigen3 3.3.7 REQUIRED)
|
find_package(Eigen3 3.3.7 EXACT REQUIRED MODULE)
|
||||||
include_directories(${EIGEN3_INCLUDE_DIR})
|
include_directories(${EIGEN3_INCLUDE_DIR})
|
||||||
message(STATUS "Found Eigen headers in: ${EIGEN3_INCLUDE_DIR}")
|
message(STATUS "Found Eigen headers in: ${EIGEN3_INCLUDE_DIR}")
|
||||||
if(NOT EIGEN3_INCLUDE_DIR MATCHES "^${EIGEN_ROOT}")
|
if(NOT EIGEN3_INCLUDE_DIR MATCHES "^${EIGEN_ROOT}")
|
||||||
|
|
|
@ -15,6 +15,10 @@
|
||||||
# Copyright (c) 2009 Benoit Jacob <jacob.benoit.1@gmail.com>
|
# Copyright (c) 2009 Benoit Jacob <jacob.benoit.1@gmail.com>
|
||||||
# Redistribution and use is allowed according to the terms of the 2-clause BSD license.
|
# Redistribution and use is allowed according to the terms of the 2-clause BSD license.
|
||||||
|
|
||||||
|
# Adaptations (c) Nikolaus Demmel 2019
|
||||||
|
# - pass NO_DEFAULT_PATH --> only works when passing exact HINTS
|
||||||
|
|
||||||
|
|
||||||
if(NOT Eigen3_FIND_VERSION)
|
if(NOT Eigen3_FIND_VERSION)
|
||||||
if(NOT Eigen3_FIND_VERSION_MAJOR)
|
if(NOT Eigen3_FIND_VERSION_MAJOR)
|
||||||
set(Eigen3_FIND_VERSION_MAJOR 2)
|
set(Eigen3_FIND_VERSION_MAJOR 2)
|
||||||
|
@ -63,12 +67,7 @@ else (EIGEN3_INCLUDE_DIR)
|
||||||
|
|
||||||
find_path(EIGEN3_INCLUDE_DIR NAMES signature_of_eigen3_matrix_library
|
find_path(EIGEN3_INCLUDE_DIR NAMES signature_of_eigen3_matrix_library
|
||||||
HINTS ${EIGEN_INCLUDE_DIR_HINTS}
|
HINTS ${EIGEN_INCLUDE_DIR_HINTS}
|
||||||
PATHS
|
NO_DEFAULT_PATH
|
||||||
/usr/local/include
|
|
||||||
/opt/local/include
|
|
||||||
${CMAKE_INSTALL_PREFIX}/include
|
|
||||||
${KDE4_INCLUDE_DIR}
|
|
||||||
PATH_SUFFIXES eigen3 eigen
|
|
||||||
)
|
)
|
||||||
|
|
||||||
if(EIGEN3_INCLUDE_DIR)
|
if(EIGEN3_INCLUDE_DIR)
|
||||||
|
|
Loading…
Reference in New Issue