Fixed a few more missing CERES_NO_CUDA guards

Change-Id: I65c1851085f816794079ef56de0426fcdd055c87
diff --git a/internal/ceres/dense_cholesky_test.cc b/internal/ceres/dense_cholesky_test.cc
index 34ff4f3..2c4ca10 100644
--- a/internal/ceres/dense_cholesky_test.cc
+++ b/internal/ceres/dense_cholesky_test.cc
@@ -75,9 +75,11 @@
 
   LinearSolver::Options options;
   ContextImpl context;
+#ifndef CERES_NO_CUDA
   options.context = &context;
   std::string error;
   CHECK(context.InitCUDA(&error)) << error;
+#endif  // CERES_NO_CUDA
   options.dense_linear_algebra_library_type = ::testing::get<0>(GetParam());
   options.use_mixed_precision_solves = ::testing::get<1>(GetParam());
   const int kNumRefinementSteps = 4;
diff --git a/internal/ceres/dense_qr_test.cc b/internal/ceres/dense_qr_test.cc
index f562d97..c10dba5 100644
--- a/internal/ceres/dense_qr_test.cc
+++ b/internal/ceres/dense_qr_test.cc
@@ -67,9 +67,11 @@
 
   LinearSolver::Options options;
   ContextImpl context;
+#ifndef CERES_NO_CUDA
   options.context = &context;
   std::string error;
   CHECK(context.InitCUDA(&error)) << error;
+#endif  // CERES_NO_CUDA
   options.dense_linear_algebra_library_type = GetParam();
   const double kEpsilon = std::numeric_limits<double>::epsilon() * 1.5e4;
   std::unique_ptr<DenseQR> dense_qr = DenseQR::Create(options);