mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-11 00:11:07 -06:00
cmCTestHandlerCommand: Capture list of parsed keywords via binding
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user