cmIDEOptions: Add an AppendFlag method to update multi-valued options

This commit is contained in:
Brad King 2014-07-31 14:02:03 -04:00
parent 0a5fe2793a
commit 29410df23d
2 changed files with 8 additions and 0 deletions

View File

@ -195,6 +195,13 @@ void cmIDEOptions::AddFlag(const char* flag,
this->FlagMap[flag] = value; this->FlagMap[flag] = value;
} }
//----------------------------------------------------------------------------
void cmIDEOptions::AppendFlag(std::string const& flag,
std::string const& value)
{
this->FlagMap[flag].push_back(value);
}
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
void cmIDEOptions::RemoveFlag(const char* flag) void cmIDEOptions::RemoveFlag(const char* flag)
{ {

View File

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