diff options
author | Stephen Kelly <steveire@gmail.com> | 2013-07-26 12:02:18 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2013-07-26 12:05:25 (GMT) |
commit | f94bdb3deb70d0fa7ed5275609318be8ac79503b (patch) | |
tree | f2eaf29b98abb1c855da36b1080801a668306a1a | |
parent | ff3d5fae5d8549ff1966acc1f883cc1ddb061d61 (diff) | |
download | CMake-f94bdb3deb70d0fa7ed5275609318be8ac79503b.zip CMake-f94bdb3deb70d0fa7ed5275609318be8ac79503b.tar.gz CMake-f94bdb3deb70d0fa7ed5275609318be8ac79503b.tar.bz2 |
cmTarget: Remove duplicates when printing traces of tll signatures
-rw-r--r-- | Source/cmTarget.cxx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 6dde5ed..136c43c 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -2521,6 +2521,7 @@ void cmTarget::GetTllSignatureTraces(cmOStringStream &s, = (sig == cmTarget::KeywordTLLSignature ? "keyword" : "plain"); s << "The uses of the " << sigString << " signature are here:\n"; + std::set<cmStdString> emitted; for(std::vector<cmListFileBacktrace>::const_iterator it = sigs.begin(); it != sigs.end(); ++it) { @@ -2528,7 +2529,12 @@ void cmTarget::GetTllSignatureTraces(cmOStringStream &s, if(i != it->end()) { cmListFileContext const& lfc = *i; - s << " * " << (lfc.Line? "": " in ") << lfc << std::endl; + cmOStringStream line; + line << " * " << (lfc.Line? "": " in ") << lfc << std::endl; + if (emitted.insert(line.str()).second) + { + s << line.str(); + } ++i; } } |