diff options
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r-- | Source/cmMakefile.cxx | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 34b4855..c6bc4f2 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -2365,7 +2365,14 @@ void cmMakefile::PopFunctionBlockerBarrier(bool reportError) this->FunctionBlockers.pop_back(); if(reportError) { - fb->ScopeEnded(*this); + // Report the context in which the unclosed block was opened. + cmListFileContext const& lfc = fb->GetStartingContext(); + cmOStringStream e; + e << "A logical block opening on the line\n" + << " " << lfc << "\n" + << "is not closed."; + this->IssueMessage(cmake::FATAL_ERROR, e.str()); + reportError = false; } } @@ -2402,6 +2409,18 @@ bool cmMakefile::ExpandArguments( return !cmSystemTools::GetFatalErrorOccured(); } +//---------------------------------------------------------------------------- +void cmMakefile::AddFunctionBlocker(cmFunctionBlocker* fb) +{ + if(!this->CallStack.empty()) + { + // Record the context in which the blocker is created. + fb->SetStartingContext(*(this->CallStack.back().Context)); + } + + this->FunctionBlockers.push_back(fb); +} + cmsys::auto_ptr<cmFunctionBlocker> cmMakefile::RemoveFunctionBlocker(const cmListFileFunction& lff) { |