From 62739c95c71336ea51d39c97ae9de59f4033e764 Mon Sep 17 00:00:00 2001
From: Matthieu Schaller <matthieu.schaller@durham.ac.uk>
Date: Thu, 10 Aug 2017 11:03:14 +0100
Subject: [PATCH] Only compile the Ewald interpolation function when running
 the Gravity checks.

---
 src/gravity.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/gravity.c b/src/gravity.c
index 98b6745656..047af3b084 100644
--- a/src/gravity.c
+++ b/src/gravity.c
@@ -232,6 +232,7 @@ void gravity_exact_force_ewald_free() {
 #endif
 }
 
+#ifdef SWIFT_GRAVITY_FORCE_CHECKS
 /**
  * @brief Compute the Ewald correction for a given distance vector r.
  *
@@ -305,6 +306,7 @@ gravity_exact_force_ewald_evaluate(double rx, double ry, double rz,
   corr[2] += fewald_z[i + 1][j + 1][k + 1] * dx * dy * dz;
   corr[2] *= s_z;
 }
+#endif
 
 /**
  * @brief Checks whether the file containing the exact accelerations for
-- 
GitLab