diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-04-04 21:33:26 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-04-13 18:13:13 (GMT) |
commit | b159bff732d4e34a683edd1740604428049d1819 (patch) | |
tree | ef8513a3fa37802bc27c11543209da7e8cd9f2da /Source/cmState.cxx | |
parent | 62c5e6f1a19df0043a0e9aaba6cf7247f76a5cc3 (diff) | |
download | CMake-b159bff732d4e34a683edd1740604428049d1819.zip CMake-b159bff732d4e34a683edd1740604428049d1819.tar.gz CMake-b159bff732d4e34a683edd1740604428049d1819.tar.bz2 |
Move property definition to cmState.
Diffstat (limited to 'Source/cmState.cxx')
-rw-r--r-- | Source/cmState.cxx | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/Source/cmState.cxx b/Source/cmState.cxx index 7602f63..3e88ecc 100644 --- a/Source/cmState.cxx +++ b/Source/cmState.cxx @@ -178,3 +178,61 @@ void cmState::RemoveCacheEntryProperty(std::string const& key, this->CMakeInstance->GetCacheManager() ->GetCacheIterator(key.c_str()).SetProperty(propertyName, (void*)0); } + +void cmState::Initialize() +{ + this->PropertyDefinitions.clear(); + this->DefineProperty + ("RULE_LAUNCH_COMPILE", cmProperty::DIRECTORY, + "", "", true); + this->DefineProperty + ("RULE_LAUNCH_LINK", cmProperty::DIRECTORY, + "", "", true); + this->DefineProperty + ("RULE_LAUNCH_CUSTOM", cmProperty::DIRECTORY, + "", "", true); + + this->DefineProperty + ("RULE_LAUNCH_COMPILE", cmProperty::TARGET, + "", "", true); + this->DefineProperty + ("RULE_LAUNCH_LINK", cmProperty::TARGET, + "", "", true); + this->DefineProperty + ("RULE_LAUNCH_CUSTOM", cmProperty::TARGET, + "", "", true); +} + +void cmState::DefineProperty(const std::string& name, + cmProperty::ScopeType scope, + const char *ShortDescription, + const char *FullDescription, + bool chained) +{ + this->PropertyDefinitions[scope].DefineProperty(name,scope,ShortDescription, + FullDescription, + chained); +} + +cmPropertyDefinition *cmState +::GetPropertyDefinition(const std::string& name, + cmProperty::ScopeType scope) +{ + if (this->IsPropertyDefined(name,scope)) + { + return &(this->PropertyDefinitions[scope][name]); + } + return 0; +} + +bool cmState::IsPropertyDefined(const std::string& name, + cmProperty::ScopeType scope) +{ + return this->PropertyDefinitions[scope].IsPropertyDefined(name); +} + +bool cmState::IsPropertyChained(const std::string& name, + cmProperty::ScopeType scope) +{ + return this->PropertyDefinitions[scope].IsPropertyChained(name); +} |