ENH: made immediate
This commit is contained in:
parent
8e3832c3d5
commit
c3c609ab03
|
@ -25,30 +25,25 @@ bool cmVariableRequiresCommand::InitialPass(std::vector<std::string> const& args
|
||||||
this->SetError("called with incorrect number of arguments");
|
this->SetError("called with incorrect number of arguments");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
m_Arguments = args;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
void cmVariableRequiresCommand::FinalPass()
|
std::string testVariable = args[0];
|
||||||
{
|
|
||||||
std::string testVariable = m_Arguments[0];
|
|
||||||
if(!m_Makefile->IsOn(testVariable.c_str()))
|
if(!m_Makefile->IsOn(testVariable.c_str()))
|
||||||
{
|
{
|
||||||
return;
|
return true;
|
||||||
}
|
}
|
||||||
std::string resultVariable = m_Arguments[1];
|
std::string resultVariable = args[1];
|
||||||
bool requirementsMet = true;
|
bool requirementsMet = true;
|
||||||
std::string notSet;
|
std::string notSet;
|
||||||
bool hasAdvanced = false;
|
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;
|
requirementsMet = false;
|
||||||
notSet += m_Arguments[i];
|
notSet += args[i];
|
||||||
notSet += "\n";
|
notSet += "\n";
|
||||||
cmCacheManager::CacheIterator it =
|
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"))
|
if(!it.IsAtEnd() && it.GetPropertyAsBool("ADVANCED"))
|
||||||
{
|
{
|
||||||
hasAdvanced = true;
|
hasAdvanced = true;
|
||||||
|
@ -77,4 +72,6 @@ void cmVariableRequiresCommand::FinalPass()
|
||||||
}
|
}
|
||||||
cmSystemTools::Error(message.c_str());
|
cmSystemTools::Error(message.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,8 +40,6 @@ public:
|
||||||
*/
|
*/
|
||||||
virtual bool InitialPass(std::vector<std::string> const& args);
|
virtual bool InitialPass(std::vector<std::string> const& args);
|
||||||
|
|
||||||
///!
|
|
||||||
virtual void FinalPass();
|
|
||||||
/**
|
/**
|
||||||
* The name of the command as specified in CMakeList.txt.
|
* The name of the command as specified in CMakeList.txt.
|
||||||
*/
|
*/
|
||||||
|
@ -77,7 +75,6 @@ public:
|
||||||
cmTypeMacro(cmVariableRequiresCommand, cmCommand);
|
cmTypeMacro(cmVariableRequiresCommand, cmCommand);
|
||||||
private:
|
private:
|
||||||
std::string m_ErrorMessage;
|
std::string m_ErrorMessage;
|
||||||
std::vector<std::string> m_Arguments;
|
|
||||||
bool m_RequirementsMet;
|
bool m_RequirementsMet;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue