borglab / gtsam

GTSAM is a library of C++ classes that implement smoothing and mapping (SAM) in robotics and vision, using factor graphs and Bayes networks as the underlying computing paradigm rather than sparse matrices.
http://gtsam.org
Other
2.62k stars 767 forks source link

Allow using system ceres #1259

Closed Tobias-Fischer closed 2 years ago

Tobias-Fischer commented 2 years ago

Feature

Currently gtsam always ships its own bundled version of ceres. It would be great if a similar approach as for Eigen or Metis is taken, where alternatively the system version can be used.

Motivation

Bundling ceres is undesirable if package managers like conda-forge are used. Also, most distributions ship ceres themselves, so there should not be a need for the bundled version.

Pitch

Create a cmake/HandleCeres.cmake file that follows the structure of HandleMetis.cmake/HandleEigen.cmake and allows defining GTSAM_USE_SYSTEM_CERES if one wants to use the system ceres.

Alternatives

N/A

Additional context

This relates to our efforts to package gtsam in conda-forge. Currently we patch gtsam to always use the ceres shipped with conda-forge (https://github.com/conda-forge/gtsam-feedstock/blob/main/recipe/unvendor-ceres.patch)

varunagrawal commented 2 years ago

@Tobias-Fischer I believe this is already tracked in #292? Would you be okay with closing this and updating that issue so we can track all the system libraries together?

Tobias-Fischer commented 2 years ago

Indeed this issue already mentions Ceres, so happy to close here.