summaryrefslogtreecommitdiffstats
path: root/Source/cmEndForEachCommand.cxx
diff options
context:
space:
mode:
authorKen Martin <ken.martin@kitware.com>2004-05-12 18:32:25 (GMT)
committerKen Martin <ken.martin@kitware.com>2004-05-12 18:32:25 (GMT)
commit79fcc81b6a031cab21e8bd0e3487cdb542aed7ff (patch)
treedd9a7ef5319c752d93644c89942cf345e2eed162 /Source/cmEndForEachCommand.cxx
parent0b2bdfa2898f4dd5beb0be5a7cf2964936ecda65 (diff)
downloadCMake-79fcc81b6a031cab21e8bd0e3487cdb542aed7ff.zip
CMake-79fcc81b6a031cab21e8bd0e3487cdb542aed7ff.tar.gz
CMake-79fcc81b6a031cab21e8bd0e3487cdb542aed7ff.tar.bz2
better error checking for FOREACH
Diffstat (limited to 'Source/cmEndForEachCommand.cxx')
-rw-r--r--Source/cmEndForEachCommand.cxx15
1 files changed, 2 insertions, 13 deletions
diff --git a/Source/cmEndForEachCommand.cxx b/Source/cmEndForEachCommand.cxx
index f29feb9..6324d11 100644
--- a/Source/cmEndForEachCommand.cxx
+++ b/Source/cmEndForEachCommand.cxx
@@ -18,18 +18,7 @@
bool cmEndForEachCommand::InvokeInitialPass(std::vector<cmListFileArgument> const& args)
{
- if(args.size() < 1 )
- {
- this->SetError("called with incorrect number of arguments");
- return false;
- }
-
- // remove any function blockers for this define
- cmListFileFunction lff;
- lff.m_Name = "ENDFOREACH";
- lff.m_Arguments = args;
- m_Makefile->RemoveFunctionBlocker(lff);
-
- return true;
+ this->SetError("An ENDFOREACH command was found outside of a proper FOREACH ENDFOREACH structure. Or its arguments did not match the opening FOREACH command.");
+ return false;
}