summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2003-06-04 18:00:30 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2003-06-04 18:00:30 (GMT)
commit620b832da39fe23209baf41f3daa19f366f1dbad (patch)
tree05fff2bc509ad83f9c5fc6bd8628f51b09da0740 /Source
parent5be2ec1d47cd85969215769556114c6dd821cfeb (diff)
downloadCMake-620b832da39fe23209baf41f3daa19f366f1dbad.zip
CMake-620b832da39fe23209baf41f3daa19f366f1dbad.tar.gz
CMake-620b832da39fe23209baf41f3daa19f366f1dbad.tar.bz2
ENH: allow duplicate commands with the same output to be reduced automatically to one command
Diffstat (limited to 'Source')
-rw-r--r--Source/cmMakefile.cxx10
1 files changed, 9 insertions, 1 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 5678178..2e9ef62 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;
}