diff options
author | Ken Martin <ken.martin@kitware.com> | 2005-06-01 12:48:58 (GMT) |
---|---|---|
committer | Ken Martin <ken.martin@kitware.com> | 2005-06-01 12:48:58 (GMT) |
commit | c3c609ab039ee97d90755e29da190d532a6ca60f (patch) | |
tree | 0b83f60abf40e0d7b6183996310de3f298a7e171 | |
parent | 8e3832c3d5540121ed78b81dafa6ab3e5c1d8889 (diff) | |
download | CMake-c3c609ab039ee97d90755e29da190d532a6ca60f.zip CMake-c3c609ab039ee97d90755e29da190d532a6ca60f.tar.gz CMake-c3c609ab039ee97d90755e29da190d532a6ca60f.tar.bz2 |
ENH: made immediate
-rw-r--r-- | Source/cmVariableRequiresCommand.cxx | 21 | ||||
-rw-r--r-- | Source/cmVariableRequiresCommand.h | 3 |
2 files changed, 9 insertions, 15 deletions
diff --git a/Source/cmVariableRequiresCommand.cxx b/Source/cmVariableRequiresCommand.cxx index 894e774..b447d23 100644 --- a/Source/cmVariableRequiresCommand.cxx +++ b/Source/cmVariableRequiresCommand.cxx @@ -25,30 +25,25 @@ bool cmVariableRequiresCommand::InitialPass(std::vector<std::string> const& args this->SetError("called with incorrect number of arguments"); return false; } - m_Arguments = args; - return true; -} -void cmVariableRequiresCommand::FinalPass() -{ - std::string testVariable = m_Arguments[0]; + std::string testVariable = args[0]; if(!m_Makefile->IsOn(testVariable.c_str())) { - return; + return true; } - std::string resultVariable = m_Arguments[1]; + std::string resultVariable = args[1]; bool requirementsMet = true; std::string notSet; bool hasAdvanced = false; - for(unsigned int i = 2; i < m_Arguments.size(); ++i) + for(unsigned int i = 2; i < args.size(); ++i) { - if(!m_Makefile->IsOn(m_Arguments[i].c_str())) + if(!m_Makefile->IsOn(args[i].c_str())) { requirementsMet = false; - notSet += m_Arguments[i]; + notSet += args[i]; notSet += "\n"; cmCacheManager::CacheIterator it = - m_Makefile->GetCacheManager()->GetCacheIterator(m_Arguments[i].c_str()); + m_Makefile->GetCacheManager()->GetCacheIterator(args[i].c_str()); if(!it.IsAtEnd() && it.GetPropertyAsBool("ADVANCED")) { hasAdvanced = true; @@ -77,4 +72,6 @@ void cmVariableRequiresCommand::FinalPass() } cmSystemTools::Error(message.c_str()); } + + return true; } diff --git a/Source/cmVariableRequiresCommand.h b/Source/cmVariableRequiresCommand.h index 6ceb77a..02ab248 100644 --- a/Source/cmVariableRequiresCommand.h +++ b/Source/cmVariableRequiresCommand.h @@ -40,8 +40,6 @@ public: */ virtual bool InitialPass(std::vector<std::string> const& args); - ///! - virtual void FinalPass(); /** * The name of the command as specified in CMakeList.txt. */ @@ -77,7 +75,6 @@ public: cmTypeMacro(cmVariableRequiresCommand, cmCommand); private: std::string m_ErrorMessage; - std::vector<std::string> m_Arguments; bool m_RequirementsMet; }; |