From 6b9e647239b67aff3119efbe2691fefe9c2dc28b Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Thu, 14 May 2015 23:47:40 +0200 Subject: cmMakefile: Port CurrentListFile clients to GetDefinition. There is no need to store this as a member variable. --- Source/cmExtraQbsGenerator.cxx | 4 +++- Source/cmLocalNinjaGenerator.cxx | 4 ++-- Source/cmMakefile.cxx | 3 ++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Source/cmExtraQbsGenerator.cxx b/Source/cmExtraQbsGenerator.cxx index 4cc4650..c15f8da 100644 --- a/Source/cmExtraQbsGenerator.cxx +++ b/Source/cmExtraQbsGenerator.cxx @@ -182,7 +182,9 @@ void cmExtraQbsGenerator::AppendSources(cmGeneratedFileStream &fout, std::vector genSources; std::vector::const_iterator itr = sources.begin(); fout << "\t\t\tfiles: [\n" - << "\t\t\t\t\"" << t.GetMakefile()->GetCurrentListFile() << "\",\n"; + << "\t\t\t\t\"" + << t.GetMakefile()->GetDefinition("CMAKE_CURRENT_LIST_FILE") + << "\",\n"; for (; itr != sources.end(); ++itr) { if (!(*itr)->GetPropertyAsBool("GENERATED")) diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx index f1f1202..bcae486 100644 --- a/Source/cmLocalNinjaGenerator.cxx +++ b/Source/cmLocalNinjaGenerator.cxx @@ -305,8 +305,8 @@ void cmLocalNinjaGenerator::WriteProcessedMakefile(std::ostream& os) cmGlobalNinjaGenerator::WriteDivider(os); os << "# Write statements declared in CMakeLists.txt:" << std::endl - << "# " << this->Makefile->GetCurrentListFile() << std::endl - ; + << "# " + << this->Makefile->GetDefinition("CMAKE_CURRENT_LIST_FILE") << std::endl; if(this->IsRootMakefile()) os << "# Which is the root file." << std::endl; cmGlobalNinjaGenerator::WriteDivider(os); diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 3e19cbb..0a112cb 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -609,7 +609,8 @@ bool cmMakefile::ProcessBuildsystemFile(const char* listfile) bool cmMakefile::ReadDependentFile(const char* listfile, bool noPolicyScope) { - this->AddDefinition("CMAKE_PARENT_LIST_FILE", this->GetCurrentListFile()); + this->AddDefinition("CMAKE_PARENT_LIST_FILE", + this->GetDefinition("CMAKE_CURRENT_LIST_FILE")); this->cmCurrentListFile = cmSystemTools::CollapseFullPath(listfile, this->GetCurrentSourceDirectory()); -- cgit v0.12