summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-07-07 21:37:20 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-07-18 11:11:45 (GMT)
commit647b533bce48b741a6b048a1e62b24b9bb2f8d23 (patch)
tree4008fae579865f2a70a40f7ab8987e6ca7e3a685 /Source
parenta5412fbab45c9386f95fba3567e38c7b1cf8308d (diff)
downloadCMake-647b533bce48b741a6b048a1e62b24b9bb2f8d23.zip
CMake-647b533bce48b741a6b048a1e62b24b9bb2f8d23.tar.gz
CMake-647b533bce48b741a6b048a1e62b24b9bb2f8d23.tar.bz2
cmMakefile: Implement FormatListFileStack in terms of cmState.
Diffstat (limited to 'Source')
-rw-r--r--Source/cmMakefile.cxx16
1 files changed, 12 insertions, 4 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 94c77e1..cbaf972 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -4439,14 +4439,22 @@ void cmMakefile::AddCMakeDependFilesFromUser()
std::string cmMakefile::FormatListFileStack() const
{
+ std::vector<std::string> listFiles;
+ cmState::Snapshot snp = this->StateSnapshot;
+ while (snp.IsValid())
+ {
+ listFiles.push_back(snp.GetExecutionListFile());
+ snp = snp.GetCallStackParent();
+ }
+ std::reverse(listFiles.begin(), listFiles.end());
std::ostringstream tmp;
- size_t depth = this->ListFileStack.size();
+ size_t depth = listFiles.size();
if (depth > 0)
{
- std::vector<std::string>::const_iterator it = this->ListFileStack.end();
+ std::vector<std::string>::const_iterator it = listFiles.end();
do
{
- if (depth != this->ListFileStack.size())
+ if (depth != listFiles.size())
{
tmp << "\n ";
}
@@ -4457,7 +4465,7 @@ std::string cmMakefile::FormatListFileStack() const
tmp << *it;
depth--;
}
- while (it != this->ListFileStack.begin());
+ while (it != listFiles.begin());
}
return tmp.str();
}