Insert missing CUDA guards. Change-Id: If97c51557376385e3958863072cfcf76dd810d15
diff --git a/internal/ceres/solver.cc b/internal/ceres/solver.cc index 0e0790e..e947e06 100644 --- a/internal/ceres/solver.cc +++ b/internal/ceres/solver.cc
@@ -724,12 +724,14 @@ Program* program = problem_impl->mutable_program(); PreSolveSummarize(options, problem_impl, summary); +#ifndef CERES_NO_CUDA if (IsCudaRequired(options)) { if (!problem_impl->context()->InitCUDA(&summary->message)) { LOG(ERROR) << "Terminating: " << summary->message; return; } } +#endif // CERES_NO_CUDA // If gradient_checking is enabled, wrap all cost functions in a // gradient checker and install a callback that terminates if any gradient