diff options
author | Brad King <brad.king@kitware.com> | 2015-06-08 17:54:09 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2015-06-08 17:54:09 (GMT) |
commit | ccc6fe94453444ebd5e655a9f90a5d074049f846 (patch) | |
tree | 97eaffae69c39b5dde06e96ddfb1b038d1affefe /Source/cmMakefile.h | |
parent | 21c92a00bf50afedf52388c5f5a73cba7f756561 (diff) | |
parent | 4c192fb53152a61015eb29c0a3826adeec16f8f8 (diff) | |
download | CMake-ccc6fe94453444ebd5e655a9f90a5d074049f846.zip CMake-ccc6fe94453444ebd5e655a9f90a5d074049f846.tar.gz CMake-ccc6fe94453444ebd5e655a9f90a5d074049f846.tar.bz2 |
Merge topic 'clean-up-cmMakefile'
4c192fb5 cmMakefile: Remove cacheOnly option from GetDefinitions.
046aafff cmGetCMakePropertyCommand: Don't explicitly specify default param.
021c4b6f cmMakefile: Simplify handling of CACHE_VARIABLES property.
1981c971 cmMakefile: Simplify InitializeFromParent method.
353e422b cmMakefile: Remove unused GetPolicies method.
00bfa047 cmMakefile: Out-of-line the cmMakefileCall.
db74ce58 cmMakefile: Inline PushScope into PushFunctionScope.
ca140c2e cmMakefile: Create a unified raii for macro scopes.
d5dc4169 cmMakefile: Create a unified raii for function scopes.
Diffstat (limited to 'Source/cmMakefile.h')
-rw-r--r-- | Source/cmMakefile.h | 52 |
1 files changed, 34 insertions, 18 deletions
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index c6e8bff..46df37b 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -14,7 +14,6 @@ #include "cmExecutionStatus.h" #include "cmListFileCache.h" -#include "cmPolicies.h" #include "cmPropertyMap.h" #include "cmSystemTools.h" #include "cmTarget.h" @@ -373,11 +372,6 @@ public: }; friend class PolicyPushPop; - /** - * Get the Policies Instance - */ - cmPolicies *GetPolicies() const; - mutable std::set<cmListFileContext> CMP0054ReportedIds; /** @@ -517,7 +511,7 @@ public: * cacheonly is specified and is greater than 0, then only cache * variables will be listed. */ - std::vector<std::string> GetDefinitions(int cacheonly=0) const; + std::vector<std::string> GetDefinitions() const; /** * Test a boolean variable to see if it is true or false. @@ -731,7 +725,7 @@ public: cmPropertyMap &GetProperties() { return this->Properties; } ///! Initialize a makefile from its parent - void InitializeFromParent(); + void InitializeFromParent(cmMakefile* parent); void AddInstallGenerator(cmInstallGenerator* g) { if(g) this->InstallGenerators.push_back(g); } @@ -743,7 +737,36 @@ public: const std::vector<cmTestGenerator*>& GetTestGenerators() const { return this->TestGenerators; } - // push and pop variable scopes + class FunctionPushPop + { + public: + FunctionPushPop(cmMakefile* mf, + cmPolicies::PolicyMap const& pm); + ~FunctionPushPop(); + + void Quiet() { this->ReportError = false; } + private: + cmMakefile* Makefile; + bool ReportError; + }; + + class MacroPushPop + { + public: + MacroPushPop(cmMakefile* mf, + cmPolicies::PolicyMap const& pm); + ~MacroPushPop(); + + void Quiet() { this->ReportError = false; } + private: + cmMakefile* Makefile; + bool ReportError; + }; + + void PushFunctionScope(cmPolicies::PolicyMap const& pm); + void PopFunctionScope(bool reportError); + void PushMacroScope(cmPolicies::PolicyMap const& pm); + void PopMacroScope(bool reportError); void PushScope(); void PopScope(); void RaiseScope(const std::string& var, const char *value); @@ -1054,15 +1077,8 @@ class cmMakefileCall public: cmMakefileCall(cmMakefile* mf, cmListFileContext const& lfc, - cmExecutionStatus& status): Makefile(mf) - { - cmMakefile::CallStackEntry entry = {&lfc, &status}; - this->Makefile->CallStack.push_back(entry); - } - ~cmMakefileCall() - { - this->Makefile->CallStack.pop_back(); - } + cmExecutionStatus& status); + ~cmMakefileCall(); private: cmMakefile* Makefile; }; |