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
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f0d86f5..8d6094c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -311,12 +311,15 @@
       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)
diff --git a/internal/ceres/solver_utils.cc b/internal/ceres/solver_utils.cc
index 7cf1f32..4c4a354 100644
--- a/internal/ceres/solver_utils.cc
+++ b/internal/ceres/solver_utils.cc
@@ -62,7 +62,7 @@
   "-suitesparse-(" CERES_SUITESPARSE_VERSION ")"
 #endif
 
-#ifndef CERES_NO_EIGEN_METIS
+#if !defined(CERES_NO_EIGEN_METIS) || !defined(CERES_NO_CHOLMOD_PARTITION)
   "-metis-(" CERES_METIS_VERSION ")"
 #endif