From f346d88d102c627e98f630ae1c9d26cc899f76d8 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Sun, 21 Jun 2015 23:00:44 +0200 Subject: [PATCH] cmMakefile: Avoid invoking EnforceDirectoryLevelRules. This is part of the CMP0000 implementation and only needs to be invoked for top-level buildsystem files currently. --- Source/cmGlobalGenerator.cxx | 1 + Source/cmMakefile.cxx | 1 - Source/cmMakefile.h | 5 ++--- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 23ab93de8..383984d50 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -1106,6 +1106,7 @@ void cmGlobalGenerator::Configure() // now do it lg->GetMakefile()->Configure(); + lg->GetMakefile()->EnforceDirectoryLevelRules(); // update the cache entry for the number of local generators, this is used // for progress diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index b9a66d3ff..87292ea62 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -445,7 +445,6 @@ bool cmMakefile::ProcessBuildsystemFile(const char* filename) { scope.Quiet(); } - this->EnforceDirectoryLevelRules(); return true; } diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index ebf33df62..aa70c725b 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -825,6 +825,8 @@ public: std::string GetExecutionFilePath() const; + void EnforceDirectoryLevelRules() const; + protected: // add link libraries and directories to the target void AddGlobalLinkInformation(const std::string& name, cmTarget& target); @@ -975,9 +977,6 @@ private: cmPolicies::PolicyStatus GetPolicyStatusInternal(cmPolicies::PolicyID id) const; - // Enforce rules about CMakeLists.txt files. - void EnforceDirectoryLevelRules() const; - // CMP0053 == old cmake::MessageType ExpandVariablesInStringOld( std::string& errorstr,