diff options
Diffstat (limited to 'Source/cmSourceFile.h')
-rw-r--r-- | Source/cmSourceFile.h | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/Source/cmSourceFile.h b/Source/cmSourceFile.h index 32ed68715..c1c52010c 100644 --- a/Source/cmSourceFile.h +++ b/Source/cmSourceFile.h @@ -10,10 +10,10 @@ #include "cmCustomCommand.h" #include "cmListFileCache.h" -#include "cmProperty.h" #include "cmPropertyMap.h" #include "cmSourceFileLocation.h" #include "cmSourceFileLocationKind.h" +#include "cmValue.h" class cmMakefile; @@ -42,17 +42,22 @@ public: //! Set/Get a property of this source file void SetProperty(const std::string& prop, const char* value); + void SetProperty(const std::string& prop, cmValue value); + void SetProperty(const std::string& prop, const std::string& value) + { + this->SetProperty(prop, cmValue(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 - cmProp GetProperty(const std::string& prop) const; + cmValue GetProperty(const std::string& prop) const; //! Always returns a valid pointer const std::string& GetSafeProperty(const std::string& prop) const; bool GetPropertyAsBool(const std::string& prop) const; /** Implement getting a property when called from a CMake language command like get_property or get_source_file_property. */ - cmProp GetPropertyForUser(const std::string& prop); + cmValue GetPropertyForUser(const std::string& prop); /// Marks this file as generated /** @@ -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; |