Fix bugs in CMake sanitizer, hook, and uninstall

In EnableSanitizer.cmake, switch from a macro to a function so
temporary variables do not leak, deduplicate requested sanitizers
before checking for conflicts, and apply sanitizer and common debug
flags via add_compile_options and add_link_options scoped to C and
C++ instead of mutating CMAKE_*_FLAGS.

In AddGerritCommitHook.cmake, handle both relative (submodule) and
absolute (worktree) gitdir paths, and add a timeout and status check
when downloading commit-msg so offline builds do not hang or install
an empty hook.

In uninstall.cmake.in, read the manifest with file(STRINGS), apply
DESTDIR consistently, remove broken symlinks, use file(REMOVE)
instead of deprecated cmake -E remove, and fix a missing brace.

Change-Id: If54b4257fd910bd5bf0c87c322d1a81313422c31
3 files changed
tree: b171432f2a5fab74e535cfb9832b46a8fe644a69
  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.