# HG changeset patch # User Jordi GutiƩrrez Hermoso # Date 1346272299 14400 # Node ID 50156b22f87c3c9048bb29e03a6c3b575b8c3fb4 # Parent 87f337783d95e43f7acc69b2810ea84ec85ee318 Don't define SparseCholError if there is no Suitesparse (bug #37134) diff -r 87f337783d95 -r 50156b22f87c liboctave/sparse-util.cc --- a/liboctave/sparse-util.cc Wed Aug 29 10:17:36 2012 -0700 +++ b/liboctave/sparse-util.cc Wed Aug 29 16:31:39 2012 -0400 @@ -32,6 +32,9 @@ #include "sparse-util.h" // FIXME this overload is here due to API change in SuiteSparse (3.1 -> 3.2) + +#ifdef HAVE_CHOLMOD + void SparseCholError (int status, char *file, int line, char *message) { @@ -41,6 +44,7 @@ void SparseCholError (int status, const char *file, int line, const char *message) { + // Ignore CHOLMOD_NOT_POSDEF, since we handle that in Fchol as an // error or exit status. if (status != CHOLMOD_NOT_POSDEF) @@ -63,6 +67,7 @@ return ret; } +#endif //HAVE_CHOLMOD bool sparse_indices_ok (octave_idx_type *r, octave_idx_type *c, diff -r 87f337783d95 -r 50156b22f87c liboctave/sparse-util.h --- a/liboctave/sparse-util.h Wed Aug 29 10:17:36 2012 -0700 +++ b/liboctave/sparse-util.h Wed Aug 29 16:31:39 2012 -0400 @@ -24,6 +24,8 @@ #if !defined (octave_sparse_util_h) #define octave_sparse_util_h 1 +#ifdef HAVE_CHOLMOD + // FIXME this overload is here due to API change in SuiteSparse (3.1 -> 3.2) extern OCTAVE_API void SparseCholError (int status, char *file, int line, char *message); @@ -31,6 +33,8 @@ int line, const char *message); extern OCTAVE_API int SparseCholPrint (const char *fmt, ...); +#endif //HAVE_CHOLMOD + extern OCTAVE_API bool sparse_indices_ok (octave_idx_type *r, octave_idx_type *c, octave_idx_type nrows, octave_idx_type ncols,