Conditionally disable SparseNormalCholesky.

Disable creation of SparseNormalCholesky if CXSparse and
SuiteSparse are not evailable.

Change-Id: I9a3beafef0073d1c55305beb0af31bc67ef39691
This commit is contained in:
Sameer Agarwal
2014-05-31 23:40:57 -07:00
parent be43201953
commit 7135be7b34
+8
View File
@@ -75,10 +75,18 @@ LinearSolver* LinearSolver::Create(const LinearSolver::Options& options) {
return new CgnrSolver(options);
case SPARSE_NORMAL_CHOLESKY:
#if defined(CERES_NO_SUITESPARSE) && defined(CERES_NO_CXSPARSE)
return NULL;
#else
return new SparseNormalCholeskySolver(options);
#endif
case SPARSE_SCHUR:
#if defined(CERES_NO_SUITESPARSE) && defined(CERES_NO_CXSPARSE)
return NULL;
#else
return new SparseSchurComplementSolver(options);
#endif
case DENSE_SCHUR:
return new DenseSchurComplementSolver(options);