commit | 46b4b3b002994ddb9d6fc72268c3e271243cd1df | [log] [tgz] |
---|---|---|
author | Sergiu Deitsch <sergiu.deitsch@gmail.com> | Wed Feb 19 22:50:15 2025 +0100 |
committer | Sergiu Deitsch <sergiu.deitsch@gmail.com> | Wed Feb 19 15:54:17 2025 -0800 |
tree | 2b022e21df6ec7e03bde35979bb235c363ca165c | |
parent | af39e3b9eeb32493abd89f40de4420587774ccc7 [diff] |
Do not discard caller's CMAKE_MODULE_PATH Ceres CMake package configuration relies on several own find modules (e.g., for SuiteSparse and METIS). To allow CMake to discover additional find modules, the CMAKE_MODULE_PATH variable must be updated to include the directories containing the corresponding find modules. Previously, before updating CMAKE_MODULE_PATH, Ceres stored the variable's initial value and then completely replaced it by the directory containing Ceres's modules. However, a find_dependency failure would cause an early return preventing CMAKE_MODULE_PATH to be restored. Thus, any initial user changes to CMAKE_MODULE_PATH would be lost. Now, instead of completely replacing the CMAKE_MODULE_PATH value we only prepend additional directories. An early return no longer has a destructive effect on CMAKE_MODULE_PATH. In a failure case, CMAKE_MODULE_PATH still contains caller's initial set of directories and an additional path prepended by Ceres. Fixes #1024 Change-Id: I80d92a5dff9f3cff651f950c4f8d04ece008b44b
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.
Please see ceres-solver.org for more information.