diff options
author | Ken Martin <ken.martin@kitware.com> | 2002-07-17 14:48:39 (GMT) |
---|---|---|
committer | Ken Martin <ken.martin@kitware.com> | 2002-07-17 14:48:39 (GMT) |
commit | fcc410de44e59fa4f6145292dc1f13a4498bd8b1 (patch) | |
tree | 3a26d56bed8920250e9a23e87444d7bf5e3d62d3 /Source/cmMakefile.cxx | |
parent | 3d3caacf9ec9f99cebcfaeb5ab105daa1046f945 (diff) | |
download | CMake-fcc410de44e59fa4f6145292dc1f13a4498bd8b1.zip CMake-fcc410de44e59fa4f6145292dc1f13a4498bd8b1.tar.gz CMake-fcc410de44e59fa4f6145292dc1f13a4498bd8b1.tar.bz2 |
fixed if statements inside a foreach
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r-- | Source/cmMakefile.cxx | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 496704a..9dbf31d 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -193,6 +193,12 @@ bool cmMakefile::CommandExists(const char* name) const void cmMakefile::ExecuteCommand(std::string &name, std::vector<std::string> const& arguments) { + // quick return if blocked + if(this->IsFunctionBlocked(name.c_str(), arguments)) + { + return; + } + // execute the command RegisteredCommandsMap::iterator pos = m_Commands.find(name); if(pos != m_Commands.end()) { @@ -342,12 +348,8 @@ bool cmMakefile::ReadListFile(const char* filename, const char* external) for(size_t i =0; i < numberFunctions; ++i) { cmListFileFunction& curFunction = lf->m_Functions[i]; - if(!this->IsFunctionBlocked(curFunction.m_Name.c_str(), - curFunction.m_Arguments)) - { - this->ExecuteCommand(curFunction.m_Name, - curFunction.m_Arguments); - } + this->ExecuteCommand(curFunction.m_Name, + curFunction.m_Arguments); } // send scope ended to and funciton blockers |