From 98cf623821cd5bf31e0afc47e7c6362c10bfeee2 Mon Sep 17 00:00:00 2001 From: Brad King Date: Wed, 20 Jul 2022 15:19:13 -0400 Subject: cmCTestHandlerCommand: Capture list of parsed keywords via binding --- Source/CTest/cmCTestHandlerCommand.cxx | 11 ++++++----- 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 const& args, // Process input arguments. std::vector unparsedArguments; - std::vector 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 #include +#include + #include "cmArgumentParser.h" #include "cmCTestCommand.h" @@ -44,6 +46,7 @@ protected: virtual void BindArguments(); virtual void CheckArguments(); + std::vector ParsedKeywords; bool Append = false; bool Quiet = false; std::string CaptureCMakeError; -- cgit v0.12