summaryrefslogtreecommitdiffstats
path: root/Source/cmState.h
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-07-26 11:04:09 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-08-02 06:56:57 (GMT)
commit757a1f54085af4645ee1946329e24538162ac054 (patch)
tree70bd474560d9d396b4868c80dfe2e4df18c4f347 /Source/cmState.h
parent52dbe654dea7562564be9d880540e6bc706998ba (diff)
downloadCMake-757a1f54085af4645ee1946329e24538162ac054.zip
CMake-757a1f54085af4645ee1946329e24538162ac054.tar.gz
CMake-757a1f54085af4645ee1946329e24538162ac054.tar.bz2
cmState: Move PolicyState from cmMakefile.
Implement lexical scope checking in terms of the state stack instead of barriers.
Diffstat (limited to 'Source/cmState.h')
-rw-r--r--Source/cmState.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/Source/cmState.h b/Source/cmState.h
index 63b60ef..07aa2a5 100644
--- a/Source/cmState.h
+++ b/Source/cmState.h
@@ -17,6 +17,7 @@
#include "cmPropertyMap.h"
#include "cmLinkedTree.h"
#include "cmAlgorithms.h"
+#include "cmPolicies.h"
class cmake;
class cmCommand;
@@ -24,6 +25,7 @@ class cmCommand;
class cmState
{
struct SnapshotDataType;
+ struct PolicyStackEntry;
struct BuildsystemDirectoryStateType;
typedef cmLinkedTree<SnapshotDataType>::iterator PositionType;
friend class Snapshot;
@@ -61,6 +63,13 @@ public:
void InitializeFromParent();
+ void SetPolicy(cmPolicies::PolicyID id, cmPolicies::PolicyStatus status);
+ cmPolicies::PolicyStatus GetPolicy(cmPolicies::PolicyID id) const;
+ bool HasDefinedPolicyCMP0011();
+ void PushPolicy(cmPolicies::PolicyMap entry, bool weak);
+ bool PopPolicy();
+ bool CanPopPolicyScope();
+
cmState* GetState() const;
Directory GetDirectory() const;
@@ -257,6 +266,7 @@ private:
cmLinkedTree<std::string> ExecutionListFiles;
+ cmLinkedTree<PolicyStackEntry> PolicyStack;
cmLinkedTree<SnapshotDataType> SnapshotData;
std::vector<std::string> SourceDirectoryComponents;