From 17e13f0a2de8dca416521cb5ad9775bf46030c83 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Sat, 23 May 2015 10:50:19 +0200 Subject: [PATCH] cmMakefile: Simplify CMP0000 handling. --- Source/cmMakefile.cxx | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 7c74a0fd46..f09c8cb4a4 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -519,8 +519,10 @@ bool cmMakefile::ProcessBuildsystemFile(const char* listfile) { this->AddDefinition("CMAKE_PARENT_LIST_FILE", listfile); std::string curSrc = this->GetCurrentSourceDirectory(); - return this->ReadListFile(listfile, true, - curSrc == this->GetHomeDirectory()); + bool result = this->ReadListFile(listfile, true, + curSrc == this->GetHomeDirectory()); + this->EnforceDirectoryLevelRules(); + return result; } bool cmMakefile::ReadDependentFile(const char* listfile, bool noPolicyScope) @@ -619,13 +621,6 @@ bool cmMakefile::ReadListFileInternal(const char* filenametoread, } } - // If this is the directory-level CMakeLists.txt file then perform - // some extra checks. - if(this->ListFileStack.size() == 1) - { - this->EnforceDirectoryLevelRules(); - } - return true; }