Files
ceres-solver/cmake
Sergiu Deitsch 46b4b3b002 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
2025-02-19 15:54:17 -08:00
..
2023-09-21 11:23:38 -07:00
2023-09-21 11:23:38 -07:00
2023-09-12 20:51:48 +02:00