summaryrefslogtreecommitdiffstats
path: root/Source/cmState.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-08-24 14:07:04 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2015-08-24 14:07:04 (GMT)
commit2370a99400c6450606e25562386cf40bc9c41f38 (patch)
tree9746b74aa940ef7d6b8234b57c20eaaf824aa66f /Source/cmState.h
parent58043880b944b1fc09d55f44f4abb4a52adfd288 (diff)
parentbff27391a91d1410ef33187c0c35acc0a709720d (diff)
downloadCMake-2370a99400c6450606e25562386cf40bc9c41f38.zip
CMake-2370a99400c6450606e25562386cf40bc9c41f38.tar.gz
CMake-2370a99400c6450606e25562386cf40bc9c41f38.tar.bz2
Merge topic 'cmState-definitions'
bff27391 cmState: Host variable definitions. 6954c893 cmState: Add a VariableScope snapshot type. 1fc645bd cmState: Add a Base snapshot type. 0f070dd3 cmMakefile: Decouple the container of cmDefinitions from scoping logic. 25e04ddf cmDefinitions: Implement in terms of cmLinkedTree. 4bbe261c cmMakefile: Extract InitializeVarScope method.
Diffstat (limited to 'Source/cmState.h')
-rw-r--r--Source/cmState.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/Source/cmState.h b/Source/cmState.h
index 3132d1b..86945f6 100644
--- a/Source/cmState.h
+++ b/Source/cmState.h
@@ -21,6 +21,8 @@
class cmake;
class cmCommand;
+class cmDefinitions;
+class cmListFileBacktrace;
class cmState
{
@@ -35,12 +37,14 @@ public:
enum SnapshotType
{
+ BaseType,
BuildsystemDirectoryType,
FunctionCallType,
MacroCallType,
CallStackType,
InlineListFileType,
- PolicyScopeType
+ PolicyScopeType,
+ VariableScopeType
};
class Directory;
@@ -50,6 +54,14 @@ public:
Snapshot(cmState* state = 0);
Snapshot(cmState* state, PositionType position);
+ const char* GetDefinition(std::string const& name) const;
+ bool IsInitialized(std::string const& name) const;
+ void SetDefinition(std::string const& name, std::string const& value);
+ void RemoveDefinition(std::string const& name);
+ std::vector<std::string> UnusedKeys() const;
+ std::vector<std::string> ClosureKeys() const;
+ bool RaiseScope(std::string const& var, const char* varDef);
+
void SetListFile(std::string const& listfile);
std::string GetExecutionListFile() const;
@@ -161,6 +173,9 @@ public:
std::string const& entryPointCommand,
long entryPointLine,
std::string const& fileName);
+ Snapshot CreateVariableScopeSnapshot(Snapshot originSnapshot,
+ std::string const& entryPointCommand,
+ long entryPointLine);
Snapshot CreateInlineListFileSnapshot(Snapshot originSnapshot,
const std::string& entryPointCommand,
long entryPointLine,
@@ -275,6 +290,7 @@ private:
cmLinkedTree<PolicyStackEntry> PolicyStack;
cmLinkedTree<SnapshotDataType> SnapshotData;
+ cmLinkedTree<cmDefinitions> VarTree;
std::vector<std::string> SourceDirectoryComponents;
std::vector<std::string> BinaryDirectoryComponents;