ENH: Added APPEND option to ADD_CUSTOM_COMMAND to allow extra dependencies to be connected later. This is useful to create one rule and then have a macro add things to it later. This addresses bug#2151.

This commit is contained in:
Brad King
2006-10-04 15:24:26 -04:00
parent 523075ded5
commit 2dfa2ba888
5 changed files with 74 additions and 3 deletions

View File

@@ -94,6 +94,26 @@ const char* cmCustomCommand::GetComment() const
return this->HaveComment? this->Comment.c_str() : no_comment;
}
//----------------------------------------------------------------------------
void cmCustomCommand::AppendCommands(const cmCustomCommandLines& commandLines)
{
for(cmCustomCommandLines::const_iterator i=commandLines.begin();
i != commandLines.end(); ++i)
{
this->CommandLines.push_back(*i);
}
}
//----------------------------------------------------------------------------
void cmCustomCommand::AppendDepends(const std::vector<std::string>& depends)
{
for(std::vector<std::string>::const_iterator i=depends.begin();
i != depends.end(); ++i)
{
this->Depends.push_back(*i);
}
}
//----------------------------------------------------------------------------
bool cmCustomCommand::GetEscapeOldStyle() const
{