diff options
author | Ken Martin <ken.martin@kitware.com> | 2002-08-09 16:00:49 (GMT) |
---|---|---|
committer | Ken Martin <ken.martin@kitware.com> | 2002-08-09 16:00:49 (GMT) |
commit | 6deb5bbe70e6d0498df3fbb319a9b4857410536a (patch) | |
tree | 3ff14ac5f23626b0c585dbf7a617e410fb6d8216 /Source/cmMakefile.cxx | |
parent | 67547494dba2bf2f9c45fa60fd0a1a04f3339cb8 (diff) | |
download | CMake-6deb5bbe70e6d0498df3fbb319a9b4857410536a.zip CMake-6deb5bbe70e6d0498df3fbb319a9b4857410536a.tar.gz CMake-6deb5bbe70e6d0498df3fbb319a9b4857410536a.tar.bz2 |
better IF ELSE handling
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r-- | Source/cmMakefile.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 75dd641..dc187ef 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -1242,7 +1242,6 @@ bool cmMakefile::IsFunctionBlocked(const char *name, } // loop over all function blockers to see if any block this command - std::list<cmFunctionBlocker *>::iterator pos; std::vector<std::string> expandedArguments; for(std::vector<std::string>::const_iterator i = args.begin(); i != args.end(); ++i) @@ -1255,8 +1254,10 @@ bool cmMakefile::IsFunctionBlocked(const char *name, expandedArguments.push_back(tmps); } } - for (pos = m_FunctionBlockers.begin(); - pos != m_FunctionBlockers.end(); ++pos) + // evaluate in reverse, this is critical for balanced IF statements etc + std::list<cmFunctionBlocker *>::reverse_iterator pos; + for (pos = m_FunctionBlockers.rbegin(); + pos != m_FunctionBlockers.rend(); ++pos) { if ((*pos)->NeedExpandedVariables()) { |