diff options
Diffstat (limited to 'Source/cmState.h')
-rw-r--r-- | Source/cmState.h | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/Source/cmState.h b/Source/cmState.h index 6ee2b0c..e3fbfdc 100644 --- a/Source/cmState.h +++ b/Source/cmState.h @@ -30,6 +30,8 @@ class cmStateSnapshot; class cmMessenger; class cmExecutionStatus; +using cmProp = const std::string*; + class cmState { friend class cmStateSnapshot; @@ -51,7 +53,8 @@ public: CPack, }; - static const char* GetTargetTypeName(cmStateEnums::TargetType targetType); + static const std::string& GetTargetTypeName( + cmStateEnums::TargetType targetType); cmStateSnapshot CreateBaseSnapshot(); cmStateSnapshot CreateBuildsystemDirectorySnapshot( @@ -87,7 +90,7 @@ public: bool DeleteCache(const std::string& path); std::vector<std::string> GetCacheEntryKeys() const; - const char* GetCacheEntryValue(std::string const& key) const; + cmProp GetCacheEntryValue(std::string const& key) const; std::string GetSafeCacheEntryValue(std::string const& key) const; const std::string* GetInitializedCacheValue(std::string const& key) const; cmStateEnums::CacheEntryType GetCacheEntryType(std::string const& key) const; @@ -102,8 +105,8 @@ public: void SetCacheEntryBoolProperty(std::string const& key, std::string const& propertyName, bool value); std::vector<std::string> GetCacheEntryPropertyList(std::string const& key); - const char* GetCacheEntryProperty(std::string const& key, - std::string const& propertyName); + cmProp GetCacheEntryProperty(std::string const& key, + std::string const& propertyName); bool GetCacheEntryPropertyAsBool(std::string const& key, std::string const& propertyName); void AppendCacheEntryProperty(std::string const& key, @@ -121,8 +124,8 @@ public: cmStateSnapshot Reset(); // Define a property void DefineProperty(const std::string& name, cmProperty::ScopeType scope, - const char* ShortDescription, - const char* FullDescription, bool chain = false); + const std::string& ShortDescription, + const std::string& FullDescription, bool chain = false); // get property definition cmPropertyDefinition const* GetPropertyDefinition( @@ -171,7 +174,7 @@ public: void SetGlobalProperty(const std::string& prop, const char* value); void AppendGlobalProperty(const std::string& prop, const std::string& value, bool asString = false); - const char* GetGlobalProperty(const std::string& prop); + cmProp GetGlobalProperty(const std::string& prop); bool GetGlobalPropertyAsBool(const std::string& prop); std::string const& GetSourceDirectory() const; |