diff --git a/SystemTools.cxx b/SystemTools.cxx
index dcf05daa85e3f09dd7e7c367cef451dff157c9aa..39873e630d9cbab41d8a689f25a2b6db543ac035 100644
--- a/SystemTools.cxx
+++ b/SystemTools.cxx
@@ -4666,8 +4666,12 @@ void SystemTools::ClassFinalize()
 #  include <stdlib.h>
 namespace KWSYS_NAMESPACE {
 
-static int SystemToolsDebugReport(int, char* message, int*)
+static int SystemToolsDebugReport(int, char* message, int* ret)
 {
+  if (ret) {
+    // Pretend user clicked on Retry button in popup.
+    *ret = 1;
+  }
   fprintf(stderr, "%s", message);
   fflush(stderr);
   return 1; // no further reporting required