summaryrefslogtreecommitdiffstats
path: root/Source/cmake.h
diff options
context:
space:
mode:
authorKen Martin <ken.martin@kitware.com>2006-12-07 14:45:32 (GMT)
committerKen Martin <ken.martin@kitware.com>2006-12-07 14:45:32 (GMT)
commit27379d7b081be852c2b290a98db548cffffbff04 (patch)
treefcc9e19282bdfb71bf4bf9b1f8fcea1401c2fbd5 /Source/cmake.h
parent833548f53a2ed799bb0df23fd7d973c30b423d1b (diff)
downloadCMake-27379d7b081be852c2b290a98db548cffffbff04.zip
CMake-27379d7b081be852c2b290a98db548cffffbff04.tar.gz
CMake-27379d7b081be852c2b290a98db548cffffbff04.tar.bz2
ENH: make properties a bit more formal with documentation and chaining
Diffstat (limited to 'Source/cmake.h')
-rw-r--r--Source/cmake.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/Source/cmake.h b/Source/cmake.h
index 39dbd2f..c32e3f1 100644
--- a/Source/cmake.h
+++ b/Source/cmake.h
@@ -41,6 +41,8 @@
#define cmake_h
#include "cmSystemTools.h"
+#include "cmPropertyDefinitionMap.h"
+#include "cmPropertyMap.h"
class cmGlobalGenerator;
class cmLocalGenerator;
@@ -235,8 +237,18 @@ class cmake
cmVariableWatch* GetVariableWatch() { return this->VariableWatch; }
void GetCommandDocumentation(std::vector<cmDocumentationEntry>&) const;
+ void GetPropertiesDocumentation(std::vector<cmDocumentationEntry>&);
void GetGeneratorDocumentation(std::vector<cmDocumentationEntry>&);
+ ///! Set/Get a property of this target file
+ void SetProperty(const char *prop, const char *value);
+ const char *GetProperty(const char *prop);
+ const char *GetProperty(const char *prop, cmProperty::ScopeType scope);
+ bool GetPropertyAsBool(const char *prop);
+
+ // Get the properties
+ cmPropertyMap &GetProperties() { return this->Properties; };
+
///! Do all the checks before running configure
int DoPreConfigureChecks();
@@ -278,7 +290,24 @@ class cmake
bool GetDebugOutput() { return this->DebugOutput; }
void DebugOutputOn() { this->DebugOutput = true;}
+ // Define a property
+ void DefineProperty(const char *name, cmProperty::ScopeType scope,
+ const char *ShortDescription,
+ const char *FullDescription,
+ bool chain = false);
+
+ // Is a property defined?
+ bool IsPropertyDefined(const char *name, cmProperty::ScopeType scope);
+ bool IsPropertyChained(const char *name, cmProperty::ScopeType scope);
+
protected:
+ cmPropertyMap Properties;
+ cmPropertyDefinitionMap TargetProperties;
+ cmPropertyDefinitionMap SourceFileProperties;
+ cmPropertyDefinitionMap DirectoryProperties;
+ cmPropertyDefinitionMap TestProperties;
+ cmPropertyDefinitionMap GlobalProperties;
+
typedef cmGlobalGenerator* (*CreateGeneratorFunctionType)();
typedef std::map<cmStdString,
CreateGeneratorFunctionType> RegisteredGeneratorsMap;