Revert "Fix custom Eigen on macos (EIGEN_INCLUDE_DIR_HINTS)"

This reverts commit e6c5c7226d.

Reason for revert: <INSERT REASONING HERE>

Change-Id: I38b6a0ae0a7d835d05505d1baae33a52f4752a33
This commit is contained in:
Sameer Agarwal
2019-03-07 22:11:03 +00:00
parent e6c5c7226d
commit 4f8a018531
2 changed files with 1 additions and 18 deletions
-4
View File
@@ -87,10 +87,6 @@ add_gerrit_commit_hook(${Ceres_SOURCE_DIR} ${Ceres_BINARY_DIR})
# CMake in find_path & find_library. This should ensure that we can
# still build Ceres even if Homebrew is installed in a non-standard
# location (not /usr/local).
# Note: This is a hack that breaks HINTS passed to find_... modules
# for thirdparty dependencies, since CMAKE_PREFIX_PATH takes
# precendence over HINTS. See FindEigen.cmake for notes on the
# workaround needed for making EIGEN_INCLUDE_DIR_HINTS work.
if (CMAKE_SYSTEM_NAME MATCHES "Darwin")
find_program(HOMEBREW_EXECUTABLE brew)
mark_as_advanced(FORCE HOMEBREW_EXECUTABLE)
+1 -14
View File
@@ -192,25 +192,12 @@ if (NOT EIGEN_FOUND)
Eigen/include/eigen3 # Windows (for C:/Program Files prefix) < 3.3
Eigen3/include/eigen3 ) # Windows (for C:/Program Files prefix) >= 3.3
# On macos with Homebrew, the brew prefix is added
# CMAKE_PREFIX_PATH, which overrides EIGEN_INCLUDE_DIR_HINTS in the
# following find_path, and the brew Eigen version is found (if
# installed) instead of the one provided by the hint. So, in that
# case we ignore CMAKE_PREFIX_PATH. See also the comments in ceres'
# main CMakeLists.txt around where HOMEBREW_EXECUTABLE is set.
if(HOMEBREW_EXECUTABLE AND EIGEN_INCLUDE_DIR_HINTS)
set(FIND_PATH_FLAG NO_CMAKE_PATH)
else()
set(FIND_PATH_FLAG)
endif()
# Search supplied hint directories first if supplied.
find_path(EIGEN_INCLUDE_DIR
NAMES Eigen/Core
HINTS ${EIGEN_INCLUDE_DIR_HINTS}
PATHS ${EIGEN_CHECK_INCLUDE_DIRS}
PATH_SUFFIXES ${EIGEN_CHECK_PATH_SUFFIXES}
${FIND_PATH_FLAG})
PATH_SUFFIXES ${EIGEN_CHECK_PATH_SUFFIXES})
if (NOT EIGEN_INCLUDE_DIR OR
NOT EXISTS ${EIGEN_INCLUDE_DIR})