mirror of
https://github.com/reactos/CMake.git
synced 2025-02-03 18:42:32 +00: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:
parent
f7bb40c92d
commit
80e982d7ad
@ -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;
|
||||
|
@ -91,6 +91,8 @@ private:
|
||||
std::string UnknownFlagField;
|
||||
|
||||
virtual void StoreUnknownFlag(const char* flag);
|
||||
|
||||
FlagValue TakeFlag(std::string const& key);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user