summaryrefslogtreecommitdiffstats
path: root/Source/cmakemain.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmakemain.cxx')
-rw-r--r--Source/cmakemain.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/cmakemain.cxx b/Source/cmakemain.cxx
index ad27443..ced83dc 100644
--- a/Source/cmakemain.cxx
+++ b/Source/cmakemain.cxx
@@ -392,8 +392,14 @@ int do_cmake(int ac, char const* const* av)
// Always return a non-negative value. Windows tools do not always
// interpret negative return values as errors.
if (res != 0) {
+#ifdef CMake_ENABLE_DEBUGGER
+ cm.StopDebuggerIfNeeded(1);
+#endif
return 1;
}
+#ifdef CMake_ENABLE_DEBUGGER
+ cm.StopDebuggerIfNeeded(0);
+#endif
return 0;
}