ceres-solver / ceres-solver

A large scale non-linear optimization library
http://ceres-solver.org/
Other
3.66k stars 1.01k forks source link

ceres unsets CMAKE_MODULE_PATH when a dependency is missing #1024

Open jschueller opened 6 months ago

jschueller commented 6 months ago

it can happen that find_package(Ceres) erases CMAKE_MODULE_PATH if a dependency is missing due to : https://github.com/ceres-solver/ceres-solver/blob/master/cmake/CeresConfig.cmake.in#L78

for example, install ceres but delete eg suitesparse from your system then it could prevent for other dependencies not being found if you rely on CMAKE_MODULE_PATH for other findXXX modules

a workaround is to find ceres after all find_package, or reset CMAKE_MODULE_PATH

sandwichmaker commented 4 months ago

@alexsmac / @sergiud thoughts?