summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2014-03-12 16:59:36 (GMT)
committerStephen Kelly <steveire@gmail.com>2014-03-12 17:01:26 (GMT)
commitd83245a34f870c373c6db8de94792608f133be58 (patch)
tree4b02cb53b78e063e7d5823e05510db863ff576e1 /Source
parent7534967b65b03be558940e1a112918ee28d38c20 (diff)
downloadCMake-d83245a34f870c373c6db8de94792608f133be58.zip
CMake-d83245a34f870c373c6db8de94792608f133be58.tar.gz
CMake-d83245a34f870c373c6db8de94792608f133be58.tar.bz2
cmTarget: Don't create duplicate backtraces in CMP0046 warning
Diffstat (limited to 'Source')
-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]);
- }
+ }
}
//----------------------------------------------------------------------------