mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-01 11:50:11 -05:00
VS: Add method to take a value out of the option parser flag map
Remove a flag from the map and return its value.
This commit is contained in:
@@ -274,6 +274,18 @@ void cmVisualStudioGeneratorOptions::StoreUnknownFlag(const char* flag)
|
||||
this->AppendFlagString(this->UnknownFlagField, opts);
|
||||
}
|
||||
|
||||
cmIDEOptions::FlagValue cmVisualStudioGeneratorOptions::TakeFlag(
|
||||
std::string const& key)
|
||||
{
|
||||
FlagValue value;
|
||||
std::map<std::string, FlagValue>::iterator i = this->FlagMap.find(key);
|
||||
if (i != this->FlagMap.end()) {
|
||||
value = i->second;
|
||||
this->FlagMap.erase(i);
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
void cmVisualStudioGeneratorOptions::SetConfiguration(const char* config)
|
||||
{
|
||||
this->Configuration = config;
|
||||
|
||||
Reference in New Issue
Block a user