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/cmStateDirectory.cxx | |
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/cmStateDirectory.cxx')
-rw-r--r-- | Source/cmStateDirectory.cxx | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/Source/cmStateDirectory.cxx b/Source/cmStateDirectory.cxx index b90cf7e..ed5b5d8 100644 --- a/Source/cmStateDirectory.cxx +++ b/Source/cmStateDirectory.cxx @@ -361,8 +361,9 @@ void cmStateDirectory::ClearLinkDirectories() this->Snapshot_.Position->LinkDirectoriesPosition); } -void cmStateDirectory::SetProperty(const std::string& prop, const char* value, - cmListFileBacktrace const& lfbt) +template <typename ValueType> +void cmStateDirectory::StoreProperty(const std::string& prop, ValueType value, + cmListFileBacktrace const& lfbt) { if (prop == "INCLUDE_DIRECTORIES") { if (!value) { @@ -408,6 +409,17 @@ void cmStateDirectory::SetProperty(const std::string& prop, const char* value, this->DirectoryState->Properties.SetProperty(prop, value); } +void cmStateDirectory::SetProperty(const std::string& prop, const char* value, + cmListFileBacktrace const& lfbt) +{ + this->StoreProperty(prop, value, lfbt); +} +void cmStateDirectory::SetProperty(const std::string& prop, cmProp value, + cmListFileBacktrace const& lfbt) +{ + this->StoreProperty(prop, value, lfbt); +} + void cmStateDirectory::AppendProperty(const std::string& prop, const std::string& value, bool asString, cmListFileBacktrace const& lfbt) |