summaryrefslogtreecommitdiffstats
path: root/Source/cmIfCommand.cxx
diff options
context:
space:
mode:
authorKen Martin <ken.martin@kitware.com>2002-09-10 14:16:50 (GMT)
committerKen Martin <ken.martin@kitware.com>2002-09-10 14:16:50 (GMT)
commitd7a1063b209fd2649cca5e98353c71ff560f6e7a (patch)
treea119007c292a031d585a0552d89b3f12acf1ad8b /Source/cmIfCommand.cxx
parentc2cdd8f8d35d933c5857fda761f8778e6961f861 (diff)
downloadCMake-d7a1063b209fd2649cca5e98353c71ff560f6e7a.zip
CMake-d7a1063b209fd2649cca5e98353c71ff560f6e7a.tar.gz
CMake-d7a1063b209fd2649cca5e98353c71ff560f6e7a.tar.bz2
better error checking on If statements
Diffstat (limited to 'Source/cmIfCommand.cxx')
-rw-r--r--Source/cmIfCommand.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/Source/cmIfCommand.cxx b/Source/cmIfCommand.cxx
index 0e20272..ebac504 100644
--- a/Source/cmIfCommand.cxx
+++ b/Source/cmIfCommand.cxx
@@ -19,7 +19,7 @@
bool cmIfFunctionBlocker::
IsFunctionBlocked(const char *name, const std::vector<std::string> &args,
- cmMakefile &)
+ cmMakefile &mf)
{
if (!strcmp(name,"ELSE") || !strcmp(name,"ENDIF"))
{
@@ -32,7 +32,10 @@ IsFunctionBlocked(const char *name, const std::vector<std::string> &args,
m_IsBlocking = !m_IsBlocking;
return true;
}
- return false;
+ // otherwise it must be an ENDIF statement, in that case remove the
+ // function blocker
+ mf.RemoveFunctionBlocker("ENDIF",args);
+ return true;
}
else if(args.empty())
{