diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-06-21 17:50:18 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-06-21 18:10:49 (GMT) |
commit | b7166afa6d385c4f0a0610f43ea00c8e5613a003 (patch) | |
tree | 32ae820cd860e8f1058c9e0a7aa2bfa3a8f9f323 /Source | |
parent | 27f229b9707f3a87c3ed0d469b5b2d08c80076c5 (diff) | |
download | CMake-b7166afa6d385c4f0a0610f43ea00c8e5613a003.zip CMake-b7166afa6d385c4f0a0610f43ea00c8e5613a003.tar.gz CMake-b7166afa6d385c4f0a0610f43ea00c8e5613a003.tar.bz2 |
cmMakefile: Remove File from IncludeScope.
Get it from the Makefile instead.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmMakefile.cxx | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 836667c..0142e6d 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -409,12 +409,11 @@ bool cmMakefile::ExecuteCommand(const cmListFileFunction& lff, class cmMakefile::IncludeScope { public: - IncludeScope(cmMakefile* mf, const char* fname, bool noPolicyScope); + IncludeScope(cmMakefile* mf, bool noPolicyScope); ~IncludeScope(); void Quiet() { this->ReportError = false; } private: cmMakefile* Makefile; - const char* File; bool NoPolicyScope; bool CheckCMP0011; bool ReportError; @@ -422,9 +421,9 @@ private: }; //---------------------------------------------------------------------------- -cmMakefile::IncludeScope::IncludeScope(cmMakefile* mf, const char* fname, +cmMakefile::IncludeScope::IncludeScope(cmMakefile* mf, bool noPolicyScope): - Makefile(mf), File(fname), NoPolicyScope(noPolicyScope), + Makefile(mf), NoPolicyScope(noPolicyScope), CheckCMP0011(false), ReportError(true) { if(!this->NoPolicyScope) @@ -501,7 +500,8 @@ void cmMakefile::IncludeScope::EnforceCMP0011() { std::ostringstream w; w << cmPolicies::GetPolicyWarning(cmPolicies::CMP0011) << "\n" - << "The included script\n " << this->File << "\n" + << "The included script\n " + << this->Makefile->ListFileStack.back() << "\n" << "affects policy settings. " << "CMake is implying the NO_POLICY_SCOPE option for compatibility, " << "so the effects are applied to the including context."; @@ -513,7 +513,8 @@ void cmMakefile::IncludeScope::EnforceCMP0011() { std::ostringstream e; e << cmPolicies::GetRequiredPolicyError(cmPolicies::CMP0011) << "\n" - << "The included script\n " << this->File << "\n" + << "The included script\n " + << this->Makefile->ListFileStack.back() << "\n" << "affects policy settings, so it requires this policy to be set."; this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str()); } @@ -586,7 +587,7 @@ bool cmMakefile::ReadListFile(const char* listfile, this->MarkVariableAsUsed("CMAKE_CURRENT_LIST_FILE"); this->MarkVariableAsUsed("CMAKE_CURRENT_LIST_DIR"); - IncludeScope incScope(this, filenametoread.c_str(), noPolicyScope); + IncludeScope incScope(this, noPolicyScope); this->ReadListFileInternal(listFile); if(cmSystemTools::GetFatalErrorOccured()) { |