Fix edge cases in custom CMake Find modules

Clean up a few failure modes in our Find modules.

In FindAccelerateSparse.cmake, include the sparse-solver compile
check in REQUIRED_VARS so a failed compile test marks the package as
not found, and preserve the caller's check state with
cmake_push_check_state and cmake_pop_check_state.

In FindMETIS.cmake, wait until METIS_FOUND is true before creating
METIS::METIS so a missing library does not leave a broken target, and
parse metis.h with MATCHES instead of REGEX REPLACE.

In FindSuiteSparse.cmake, pass the requested version and components
through when delegating to the native SuiteSparse config, expand
SPQR -> CHOLMOD before expanding CHOLMOD's own dependencies, and join
multi-line failure messages cleanly.

Change-Id: Iddccc31b22824c6022cb7451f7676d24aa2ca7df
3 files changed
tree: a49d2de310c0ed7542d718d353e2dba5d03614bb
  1. .github/
  2. bazel/
  3. cmake/
  4. config/
  5. data/
  6. docs/
  7. examples/
  8. include/
  9. internal/
  10. LICENSES/
  11. scripts/
  12. third_party/
  13. .bazelignore
  14. .clang-format
  15. .gitignore
  16. .gitmodules
  17. .readthedocs.yaml
  18. BUILD
  19. CITATION.cff
  20. CMakeLists.txt
  21. CONTRIBUTING.md
  22. LICENSE
  23. MODULE.bazel
  24. package.xml
  25. README.md
  26. REUSE.toml
  27. WORKSPACE
README.md

Android Linux macOS Windows

Ceres Solver

Ceres Solver is an open source C++ library for modeling and solving large, complicated optimization problems. It is a feature rich, mature and performant library which has been used in production at Google since 2010. Ceres Solver can solve two kinds of problems.

  1. Non-linear Least Squares problems with bounds constraints.
  2. General unconstrained optimization problems.

Please see the Ceres Solver website for more information.