Fix compilation error on systems without SuiteSparse installed
Issue was caused by declaring class PerThreadContext with some
members of choldmod-specific types. This class in only used from
an #ifndef CERES_NO_SUITESPARSE block and solved compilation error
by simply wrapping PerThreadContext with the same #ifndef block.
Change-Id: Icdc329073fcbd4a328e41ea8c0af0962e9c34ba8
diff --git a/internal/ceres/covariance_impl.cc b/internal/ceres/covariance_impl.cc
index 9c361f1..e3401ea 100644
--- a/internal/ceres/covariance_impl.cc
+++ b/internal/ceres/covariance_impl.cc
@@ -54,6 +54,7 @@
namespace {
// Per thread storage for SuiteSparse.
+#ifndef CERES_NO_SUITESPARSE
struct PerThreadContext {
explicit PerThreadContext(int num_rows)
: solution(NULL),
@@ -79,6 +80,7 @@
cholmod_dense* rhs;
SuiteSparse ss;
};
+#endif
} // namespace