diff options
author | Brad King <brad.king@kitware.com> | 2022-07-20 19:19:13 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2022-07-25 17:52:11 (GMT) |
commit | 98cf623821cd5bf31e0afc47e7c6362c10bfeee2 (patch) | |
tree | bf01c94b4dbae7fc6635f00b7aaa7dfdd134e180 | |
parent | 6ecd741b5ff1931e2f1381479633ceb6ddc47ce6 (diff) | |
download | CMake-98cf623821cd5bf31e0afc47e7c6362c10bfeee2.zip CMake-98cf623821cd5bf31e0afc47e7c6362c10bfeee2.tar.gz CMake-98cf623821cd5bf31e0afc47e7c6362c10bfeee2.tar.bz2 |
cmCTestHandlerCommand: Capture list of parsed keywords via binding
-rw-r--r-- | Source/CTest/cmCTestHandlerCommand.cxx | 11 | ||||
-rw-r--r-- | Source/CTest/cmCTestHandlerCommand.h | 3 |
2 files changed, 9 insertions, 5 deletions
diff --git a/Source/CTest/cmCTestHandlerCommand.cxx b/Source/CTest/cmCTestHandlerCommand.cxx index 528115e..be952cd 100644 --- a/Source/CTest/cmCTestHandlerCommand.cxx +++ b/Source/CTest/cmCTestHandlerCommand.cxx @@ -82,13 +82,13 @@ bool cmCTestHandlerCommand::InitialPass(std::vector<std::string> const& args, // Process input arguments. std::vector<std::string> unparsedArguments; - std::vector<cm::string_view> parsedKeywords; - this->Parse(args, &unparsedArguments, &parsedKeywords); + this->Parse(args, &unparsedArguments); this->CheckArguments(); - std::sort(parsedKeywords.begin(), parsedKeywords.end()); - auto it = std::adjacent_find(parsedKeywords.begin(), parsedKeywords.end()); - if (it != parsedKeywords.end()) { + std::sort(this->ParsedKeywords.begin(), this->ParsedKeywords.end()); + auto it = std::adjacent_find(this->ParsedKeywords.begin(), + this->ParsedKeywords.end()); + if (it != this->ParsedKeywords.end()) { this->Makefile->IssueMessage( MessageType::FATAL_ERROR, cmStrCat("Called with more than one value for ", *it)); @@ -232,6 +232,7 @@ void cmCTestHandlerCommand::ProcessAdditionalValues(cmCTestGenericHandler*) void cmCTestHandlerCommand::BindArguments() { + this->BindParsedKeywords(this->ParsedKeywords); this->Bind("APPEND"_s, this->Append); this->Bind("QUIET"_s, this->Quiet); this->Bind("RETURN_VALUE"_s, this->ReturnValue); diff --git a/Source/CTest/cmCTestHandlerCommand.h b/Source/CTest/cmCTestHandlerCommand.h index 31942c8..ed6d9af 100644 --- a/Source/CTest/cmCTestHandlerCommand.h +++ b/Source/CTest/cmCTestHandlerCommand.h @@ -7,6 +7,8 @@ #include <string> #include <vector> +#include <cm/string_view> + #include "cmArgumentParser.h" #include "cmCTestCommand.h" @@ -44,6 +46,7 @@ protected: virtual void BindArguments(); virtual void CheckArguments(); + std::vector<cm::string_view> ParsedKeywords; bool Append = false; bool Quiet = false; std::string CaptureCMakeError; |