ENH: allow duplicate commands with the same output to be reduced automatically to one command

This commit is contained in:
Bill Hoffman 2003-06-04 14:00:30 -04:00
parent 5be2ec1d47
commit 620b832da3
1 changed files with 9 additions and 1 deletions

View File

@ -519,7 +519,15 @@ AddCustomCommandToOutput(const char* output,
{
file = this->GetSource(main_dependency);
if (file && file->GetCustomCommand() && !replace)
{
{
cmCustomCommand* cc = file->GetCustomCommand();
// if the command and args are the same
// as the command already there, then silently skip
// this add command
if(cc->IsEquivalent(command, combinedArgs.c_str()))
{
return;
}
// generate a source instead
file = 0;
}