diff options
author | Marc Chevrier <marc.chevrier@gmail.com> | 2021-08-15 14:04:47 (GMT) |
---|---|---|
committer | Marc Chevrier <marc.chevrier@gmail.com> | 2021-08-25 08:09:02 (GMT) |
commit | 6dfa581babfb051461341ca92e0463481799361f (patch) | |
tree | b78a81eb4e7e170820e11d324e8206045c37d29f /Source/cmSourceFile.h | |
parent | 71bf838cf35fabc27ff009f2901eeffc786fa753 (diff) | |
download | CMake-6dfa581babfb051461341ca92e0463481799361f.zip CMake-6dfa581babfb051461341ca92e0463481799361f.tar.gz CMake-6dfa581babfb051461341ca92e0463481799361f.tar.bz2 |
Enhancement: SetProperty accept cmProp or std::string
Methods SetProperty of classes cmPropertyMap, cmStateDirectory
and cmMakefile accept now cmProp or std::string as argument.
Diffstat (limited to 'Source/cmSourceFile.h')
-rw-r--r-- | Source/cmSourceFile.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Source/cmSourceFile.h b/Source/cmSourceFile.h index 32ed687..78e0d27 100644 --- a/Source/cmSourceFile.h +++ b/Source/cmSourceFile.h @@ -42,6 +42,11 @@ public: //! Set/Get a property of this source file void SetProperty(const std::string& prop, const char* value); + void SetProperty(const std::string& prop, cmProp value); + void SetProperty(const std::string& prop, const std::string& value) + { + this->SetProperty(prop, cmProp(value)); + } void AppendProperty(const std::string& prop, const std::string& value, bool asString = false); //! Might return a nullptr if the property is not set or invalid @@ -145,6 +150,9 @@ public: std::string GetObjectLibrary() const; private: + template <typename ValueType> + void StoreProperty(const std::string& prop, ValueType value); + cmSourceFileLocation Location; cmPropertyMap Properties; std::unique_ptr<cmCustomCommand> CustomCommand; |