Change how ifdefs are used in dense_linear_solver_test. It appears that interspersing ifdefs with macros causes problems with Visual Studio. This patch changes the way we condition the tests for dense linear solvers based on whether LAPACK is available or not. Change-Id: I306247496265c3551edad6bc8fcec9d4cf09e68d
diff --git a/internal/ceres/dense_linear_solver_test.cc b/internal/ceres/dense_linear_solver_test.cc index 770a2d3..48da2bd 100644 --- a/internal/ceres/dense_linear_solver_test.cc +++ b/internal/ceres/dense_linear_solver_test.cc
@@ -106,18 +106,29 @@ // TODO(sameeragarwal): Should we move away from hard coded linear // least squares problem to randomly generated ones? +#ifndef CERES_NO_LAPACK + INSTANTIATE_TEST_CASE_P( DenseLinearSolver, DenseLinearSolverTest, ::testing::Combine(::testing::Values(DENSE_QR, DENSE_NORMAL_CHOLESKY), -#ifdef CERES_NO_LAPACK - ::testing::Values(EIGEN), -#else ::testing::Values(EIGEN, LAPACK), -#endif ::testing::Values(true, false), ::testing::Values(0, 1)), ParamInfoToString); +#else + +INSTANTIATE_TEST_CASE_P( + DenseLinearSolver, + DenseLinearSolverTest, + ::testing::Combine(::testing::Values(DENSE_QR, DENSE_NORMAL_CHOLESKY), + ::testing::Values(EIGEN), + ::testing::Values(true, false), + ::testing::Values(0, 1)), + ParamInfoToString); + +#endif + } // namespace internal } // namespace ceres