Mercurial > hg > octave-lyh
changeset 15251:50156b22f87c
Don't define SparseCholError if there is no Suitesparse (bug #37134)
author | Jordi Gutiérrez Hermoso <jordigh@octave.org> |
---|---|
date | Wed, 29 Aug 2012 16:31:39 -0400 |
parents | 87f337783d95 |
children | fa0118cb67d9 |
files | liboctave/sparse-util.cc liboctave/sparse-util.h |
diffstat | 2 files changed, 9 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/sparse-util.cc +++ b/liboctave/sparse-util.cc @@ -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,
--- a/liboctave/sparse-util.h +++ b/liboctave/sparse-util.h @@ -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,