cmIDEOptions: Add an AppendFlag overload to append multiple values

This commit is contained in:
Brad King 2014-08-13 13:39:35 -04:00
parent 5891b36640
commit 841001028a
2 changed files with 10 additions and 0 deletions

View File

@ -202,6 +202,14 @@ void cmIDEOptions::AppendFlag(std::string const& flag,
this->FlagMap[flag].push_back(value);
}
//----------------------------------------------------------------------------
void cmIDEOptions::AppendFlag(std::string const& flag,
std::vector<std::string> const& value)
{
FlagValue& fv = this->FlagMap[flag];
std::copy(value.begin(), value.end(), std::back_inserter(fv));
}
//----------------------------------------------------------------------------
void cmIDEOptions::RemoveFlag(const char* flag)
{

View File

@ -31,6 +31,8 @@ public:
void AddFlag(const char* flag, const char* value);
void AddFlag(const char* flag, std::vector<std::string> const& value);
void AppendFlag(std::string const& flag, std::string const& value);
void AppendFlag(std::string const& flag,
std::vector<std::string> const& value);
void RemoveFlag(const char* flag);
const char* GetFlag(const char* flag);