diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-05-18 20:10:59 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-05-18 21:55:44 (GMT) |
commit | a271f7f17707c50744c2dbeb20ae82b10c886f4f (patch) | |
tree | cf4b075e6160b4cfc0e902289cb64ca58f51c606 /Source/cmTarget.cxx | |
parent | f4300cd4dd46560c95203bad4a386c5db0bda2cd (diff) | |
download | CMake-a271f7f17707c50744c2dbeb20ae82b10c886f4f.zip CMake-a271f7f17707c50744c2dbeb20ae82b10c886f4f.tar.gz CMake-a271f7f17707c50744c2dbeb20ae82b10c886f4f.tar.bz2 |
cmTarget: Simplify CMP0023 message loop.
This method is only called if there is a mismatch and something to
print. Remove intermediate container.
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r-- | Source/cmTarget.cxx | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index e705aaa..8feb7a5 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -1251,27 +1251,17 @@ bool cmTarget::PushTLLCommandTrace(TLLSignature signature) void cmTarget::GetTllSignatureTraces(std::ostringstream &s, TLLSignature sig) const { - std::vector<cmListFileContext> sigs; + const char *sigString = (sig == cmTarget::KeywordTLLSignature ? "keyword" + : "plain"); + s << "The uses of the " << sigString << " signature are here:\n"; typedef std::vector<std::pair<TLLSignature, cmListFileContext> > Container; + cmLocalGenerator* lg = this->GetMakefile()->GetLocalGenerator(); for(Container::const_iterator it = this->TLLCommands.begin(); it != this->TLLCommands.end(); ++it) { if (it->first == sig) { - sigs.push_back(it->second); - } - } - cmLocalGenerator* lg = this->GetMakefile()->GetLocalGenerator(); - if (!sigs.empty()) - { - const char *sigString - = (sig == cmTarget::KeywordTLLSignature ? "keyword" - : "plain"); - s << "The uses of the " << sigString << " signature are here:\n"; - for(std::vector<cmListFileContext>::iterator it = sigs.begin(); - it != sigs.end(); ++it) - { - cmListFileContext lfc = *it; + cmListFileContext lfc = it->second; lfc.FilePath = lg->Convert(lfc.FilePath, cmLocalGenerator::HOME); s << " * " << lfc << std::endl; } |