cmTarget: Simplify CMP0023 message loop.
This method is only called if there is a mismatch and something to print. Remove intermediate container.
This commit is contained in:
parent
f4300cd4dd
commit
a271f7f177
@ -1251,27 +1251,17 @@ bool cmTarget::PushTLLCommandTrace(TLLSignature signature)
|
|||||||
void cmTarget::GetTllSignatureTraces(std::ostringstream &s,
|
void cmTarget::GetTllSignatureTraces(std::ostringstream &s,
|
||||||
TLLSignature sig) const
|
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;
|
typedef std::vector<std::pair<TLLSignature, cmListFileContext> > Container;
|
||||||
|
cmLocalGenerator* lg = this->GetMakefile()->GetLocalGenerator();
|
||||||
for(Container::const_iterator it = this->TLLCommands.begin();
|
for(Container::const_iterator it = this->TLLCommands.begin();
|
||||||
it != this->TLLCommands.end(); ++it)
|
it != this->TLLCommands.end(); ++it)
|
||||||
{
|
{
|
||||||
if (it->first == sig)
|
if (it->first == sig)
|
||||||
{
|
{
|
||||||
sigs.push_back(it->second);
|
cmListFileContext lfc = 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;
|
|
||||||
lfc.FilePath = lg->Convert(lfc.FilePath, cmLocalGenerator::HOME);
|
lfc.FilePath = lg->Convert(lfc.FilePath, cmLocalGenerator::HOME);
|
||||||
s << " * " << lfc << std::endl;
|
s << " * " << lfc << std::endl;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user