diff options
Diffstat (limited to 'Source/cmIfCommand.cxx')
-rw-r--r-- | Source/cmIfCommand.cxx | 7 |
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()) { |