diff options
author | Regina Pfeifer <regina@mailbox.org> | 2019-09-20 11:27:02 (GMT) |
---|---|---|
committer | Regina Pfeifer <regina@mailbox.org> | 2019-09-20 11:27:30 (GMT) |
commit | d5a6a133680e4d5798522a4b29ae6bced1f2db3a (patch) | |
tree | c6df13c4538c99c12b003f5bbc27e0d150f1ae57 /Source/cmArgumentParser.cxx | |
parent | 75b2c9717c0a8e850f524c7d70f4aaa6d224e404 (diff) | |
download | CMake-d5a6a133680e4d5798522a4b29ae6bced1f2db3a.zip CMake-d5a6a133680e4d5798522a4b29ae6bced1f2db3a.tar.gz CMake-d5a6a133680e4d5798522a4b29ae6bced1f2db3a.tar.bz2 |
cmArgumentParser: Record parsed keywords
Diffstat (limited to 'Source/cmArgumentParser.cxx')
-rw-r--r-- | Source/cmArgumentParser.cxx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Source/cmArgumentParser.cxx b/Source/cmArgumentParser.cxx index 751d117..4c87177 100644 --- a/Source/cmArgumentParser.cxx +++ b/Source/cmArgumentParser.cxx @@ -61,10 +61,14 @@ void Instance::Bind(MultiStringList& val) void Instance::Consume(cm::string_view arg, void* result, std::vector<std::string>* unparsedArguments, - std::vector<std::string>* keywordsMissingValue) + std::vector<std::string>* keywordsMissingValue, + std::vector<std::string>* parsedKeywords) { auto const it = this->Bindings.Find(arg); if (it != this->Bindings.end()) { + if (parsedKeywords != nullptr) { + parsedKeywords->emplace_back(arg); + } it->second(*this, result); if (this->ExpectValue && keywordsMissingValue != nullptr) { keywordsMissingValue->emplace_back(arg); |