Fix unused-function warning with Eigen < 3.2.2. - CreateBlockJacobian() is only ever used when Eigen >= 3.2.2 is detected, but was previously defined whenever CERES_USE_EIGEN_SPARSE was defined with no check on the Eigen version. - This resulted in an unused-function compile warning that became an error due to -Werror, preventing compilation when using Eigen < 3.2.2. Change-Id: I24628ff329f14b087ece66bf2626bdc0de4ba224
diff --git a/internal/ceres/reorder_program.cc b/internal/ceres/reorder_program.cc index 23f301a..aa3d4ce 100644 --- a/internal/ceres/reorder_program.cc +++ b/internal/ceres/reorder_program.cc
@@ -78,7 +78,7 @@ return min_parameter_block_position; } -#ifdef CERES_USE_EIGEN_SPARSE +#if EIGEN_VERSION_AT_LEAST(3, 2, 2) && defined(CERES_USE_EIGEN_SPARSE) Eigen::SparseMatrix<int> CreateBlockJacobian( const TripletSparseMatrix& block_jacobian_transpose) { typedef Eigen::SparseMatrix<int> SparseMatrix;