diff --git a/tests/Makefile.am b/tests/Makefile.am
index b356086b54b6f4f07c8bedafe1fccb543121871e..2eec538ea50440cf5589882af52d3a0c5ca04b92 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -37,6 +37,9 @@ check_PROGRAMS = testGreetings testReading testSingle testTimeIntegration \
                  testRiemannHLLC testMatrixInversion testDump testLogger \
 		 testVoronoi1D testVoronoi2D testVoronoi3D testPeriodicBC
 
+# Rebuild tests when SWIFT is updated.
+$(check_PROGRAMS): ../src/.libs/libswiftsim.a
+
 # Sources for the individual programs
 testGreetings_SOURCES = testGreetings.c