summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r--Source/cmTarget.cxx7
1 files changed, 3 insertions, 4 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 84a9a7c..3fb79d8 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -403,11 +403,10 @@ void cmTarget::SetMakefile(cmMakefile* mf)
//----------------------------------------------------------------------------
void cmTarget::AddUtility(const char *u, cmMakefile *makefile)
{
- this->Utilities.insert(u);
- if(makefile)
- {
+ if(this->Utilities.insert(u).second && makefile)
+ {
makefile->GetBacktrace(UtilityBacktraces[u]);
- }
+ }
}
//----------------------------------------------------------------------------