summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-05-18 19:59:18 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-05-18 21:55:43 (GMT)
commit52a8d19c9b67e5c902155f52fc7d145e091a5e7d (patch)
treea9e539f05822c8997262e5ffc0a27479e8c0230e /Source/cmTarget.cxx
parent59ba1215b936b04fa5c5e8041eae14a754911cb4 (diff)
downloadCMake-52a8d19c9b67e5c902155f52fc7d145e091a5e7d.zip
CMake-52a8d19c9b67e5c902155f52fc7d145e091a5e7d.tar.gz
CMake-52a8d19c9b67e5c902155f52fc7d145e091a5e7d.tar.bz2
cmTarget: Store only cmListFileContext for CMP0023 handling.
Only the top level execution context is shown, as appropriate, so store only that.
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r--Source/cmTarget.cxx27
1 files changed, 12 insertions, 15 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index d450a81..ee5f02d 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -1239,8 +1239,8 @@ bool cmTarget::PushTLLCommandTrace(TLLSignature signature)
ret = false;
}
}
- cmListFileBacktrace lfbt = this->Makefile->GetBacktrace();
- this->TLLCommands.push_back(std::make_pair(signature, lfbt));
+ cmListFileContext lfc = this->Makefile->GetExecutionContext();
+ this->TLLCommands.push_back(std::make_pair(signature, lfc));
return ret;
}
@@ -1248,8 +1248,8 @@ bool cmTarget::PushTLLCommandTrace(TLLSignature signature)
void cmTarget::GetTllSignatureTraces(std::ostringstream &s,
TLLSignature sig) const
{
- std::vector<cmListFileBacktrace> sigs;
- typedef std::vector<std::pair<TLLSignature, cmListFileBacktrace> > Container;
+ std::vector<cmListFileContext> sigs;
+ typedef std::vector<std::pair<TLLSignature, cmListFileContext> > Container;
for(Container::const_iterator it = this->TLLCommands.begin();
it != this->TLLCommands.end(); ++it)
{
@@ -1258,6 +1258,7 @@ void cmTarget::GetTllSignatureTraces(std::ostringstream &s,
sigs.push_back(it->second);
}
}
+ cmLocalGenerator* lg = this->GetMakefile()->GetLocalGenerator();
if (!sigs.empty())
{
const char *sigString
@@ -1265,20 +1266,16 @@ void cmTarget::GetTllSignatureTraces(std::ostringstream &s,
: "plain");
s << "The uses of the " << sigString << " signature are here:\n";
UNORDERED_SET<std::string> emitted;
- for(std::vector<cmListFileBacktrace>::iterator it = sigs.begin();
+ for(std::vector<cmListFileContext>::iterator it = sigs.begin();
it != sigs.end(); ++it)
{
- it->MakeRelative();
- cmListFileBacktrace::const_iterator i = it->begin();
- if(i != it->end())
+ cmListFileContext lfc = *it;
+ lfc.FilePath = lg->Convert(lfc.FilePath, cmLocalGenerator::HOME);
+ std::ostringstream line;
+ line << " * " << (lfc.Line? "": " in ") << lfc << std::endl;
+ if (emitted.insert(line.str()).second)
{
- cmListFileContext const& lfc = *i;
- std::ostringstream line;
- line << " * " << (lfc.Line? "": " in ") << lfc << std::endl;
- if (emitted.insert(line.str()).second)
- {
- s << line.str();
- }
+ s << line.str();
}
}
}