Fix reporting of METIS version

- Also fixes behaviour of EIGENMETIS option to match that of the other
  CMake dependency options, and ensure that its value aligns exactly
  with whether Eigen support for METIS will be compiled into Ceres.

Change-Id: Ifbf6f5d82b9ba89a156673eb6042519a985e6b04
This commit is contained in:
Alex Stewart
2022-06-22 19:20:40 +01:00
parent 11e6376675
commit 5de77f399e
2 changed files with 8 additions and 5 deletions
+7 -4
View File
@@ -311,12 +311,15 @@ if (EIGENMETIS)
install(FILES ${Ceres_SOURCE_DIR}/cmake/FindMETIS.cmake
DESTINATION ${RELATIVE_CMAKECONFIG_INSTALL_DIR})
endif (NOT METIS_DIR)
else (METIS_FOUND)
message("-- Did not find METIS, disabling Eigen METIS support.")
update_cache_variable(EIGENMETIS OFF)
list (APPEND CERES_COMPILE_OPTIONS CERES_NO_EIGEN_METIS)
endif (METIS_FOUND)
endif (EIGENMETIS)
if (NOT EIGENMETIS OR NOT METIS_FOUND)
else (EIGENMETIS)
message("-- Building without Eigen METIS support.")
list (APPEND CERES_COMPILE_OPTIONS CERES_NO_EIGEN_METIS)
endif (NOT EIGENMETIS OR NOT METIS_FOUND)
endif (EIGENMETIS)
if (ACCELERATESPARSE)
find_package(AccelerateSparse)