From 620b832da39fe23209baf41f3daa19f366f1dbad Mon Sep 17 00:00:00 2001 From: Bill Hoffman Date: Wed, 4 Jun 2003 14:00:30 -0400 Subject: [PATCH] ENH: allow duplicate commands with the same output to be reduced automatically to one command --- Source/cmMakefile.cxx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 5678178f2..2e9ef623d 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -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; }