diff options
| author | Marc Chevrier <marc.chevrier@gmail.com> | 2021-08-15 16:04:47 +0200 |
|---|---|---|
| committer | Marc Chevrier <marc.chevrier@gmail.com> | 2021-08-25 10:09:02 +0200 |
| commit | 6dfa581babfb051461341ca92e0463481799361f (patch) | |
| tree | b78a81eb4e7e170820e11d324e8206045c37d29f /Source/cmPropertyMap.cxx | |
| parent | 71bf838cf35fabc27ff009f2901eeffc786fa753 (diff) | |
| download | cmake-6dfa581babfb051461341ca92e0463481799361f.tar.gz | |
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/cmPropertyMap.cxx')
| -rw-r--r-- | Source/cmPropertyMap.cxx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Source/cmPropertyMap.cxx b/Source/cmPropertyMap.cxx index 3e3a44bd0b..8ad3c6f150 100644 --- a/Source/cmPropertyMap.cxx +++ b/Source/cmPropertyMap.cxx @@ -19,6 +19,15 @@ void cmPropertyMap::SetProperty(const std::string& name, const char* value) this->Map_[name] = value; } +void cmPropertyMap::SetProperty(const std::string& name, cmProp value) +{ + if (!value) { + this->Map_.erase(name); + return; + } + + this->Map_[name] = *value; +} void cmPropertyMap::AppendProperty(const std::string& name, const std::string& value, bool asString) |
