From 0a7ec1a4b6fb822968f38e4fc147fb0dd73aaed8 Mon Sep 17 00:00:00 2001 From: Bill Hoffman Date: Wed, 13 May 2009 11:08:29 -0400 Subject: [PATCH] BUG: fix for #9014, FATAL_ERROR not ending loops --- Source/cmForEachCommand.cxx | 4 ++++ Source/cmWhileCommand.cxx | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/Source/cmForEachCommand.cxx b/Source/cmForEachCommand.cxx index 7a035237f..4dead9096 100644 --- a/Source/cmForEachCommand.cxx +++ b/Source/cmForEachCommand.cxx @@ -72,6 +72,10 @@ IsFunctionBlocked(const cmListFileFunction& lff, cmMakefile &mf, mf.AddDefinition(this->Args[0].c_str(),oldDef.c_str()); return true; } + if(cmSystemTools::GetFatalErrorOccured() ) + { + return true; + } } } // restore the variable to its prior value diff --git a/Source/cmWhileCommand.cxx b/Source/cmWhileCommand.cxx index cc1651207..e51f2532c 100644 --- a/Source/cmWhileCommand.cxx +++ b/Source/cmWhileCommand.cxx @@ -60,6 +60,10 @@ IsFunctionBlocked(const cmListFileFunction& lff, cmMakefile &mf, { return true; } + if(cmSystemTools::GetFatalErrorOccured() ) + { + return true; + } } expandedArguments.clear(); mf.ExpandArguments(this->Args, expandedArguments);