From 6083ec9a78fd48c66087f9c9e887b9b405c69999 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Tue, 7 Jul 2015 23:36:13 +0200 Subject: cmMakefile: Implement LISTFILE_STACK property in terms of cmState. --- Source/cmMakefile.cxx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index cbaf972..647caba 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -4282,7 +4282,15 @@ const char *cmMakefile::GetProperty(const std::string& prop, } else if (prop == "LISTFILE_STACK") { - output = cmJoin(this->ListFileStack, ";"); + std::vector listFiles; + cmState::Snapshot snp = this->StateSnapshot; + while (snp.IsValid()) + { + listFiles.push_back(snp.GetExecutionListFile()); + snp = snp.GetCallStackParent(); + } + std::reverse(listFiles.begin(), listFiles.end()); + output = cmJoin(listFiles, ";"); return output.c_str(); } else if ( prop == "CACHE_VARIABLES" ) -- cgit v0.12