summaryrefslogtreecommitdiffstats
path: root/Source/cmVisualStudioGeneratorOptions.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-03-07 20:16:17 (GMT)
committerBrad King <brad.king@kitware.com>2017-03-10 15:19:55 (GMT)
commit80e982d7ad571ce308708d36a531df7a91ffe0f8 (patch)
treee9ce1dd06489f42292c8cc93e2bace8a01d8f7c7 /Source/cmVisualStudioGeneratorOptions.cxx
parentf7bb40c92dceedd65965c4c475b5395239e630ea (diff)
downloadCMake-80e982d7ad571ce308708d36a531df7a91ffe0f8.zip
CMake-80e982d7ad571ce308708d36a531df7a91ffe0f8.tar.gz
CMake-80e982d7ad571ce308708d36a531df7a91ffe0f8.tar.bz2
VS: Add method to take a value out of the option parser flag map
Remove a flag from the map and return its value.
Diffstat (limited to 'Source/cmVisualStudioGeneratorOptions.cxx')
-rw-r--r--Source/cmVisualStudioGeneratorOptions.cxx12
1 files changed, 12 insertions, 0 deletions
diff --git a/Source/cmVisualStudioGeneratorOptions.cxx b/Source/cmVisualStudioGeneratorOptions.cxx
index 1d20d44..3007f14 100644
--- a/Source/cmVisualStudioGeneratorOptions.cxx
+++ b/Source/cmVisualStudioGeneratorOptions.cxx
@@ -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;