summaryrefslogtreecommitdiffstats
path: root/Source/CTest/cmCTestHandlerCommand.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/CTest/cmCTestHandlerCommand.h')
-rw-r--r--Source/CTest/cmCTestHandlerCommand.h48
1 files changed, 14 insertions, 34 deletions
diff --git a/Source/CTest/cmCTestHandlerCommand.h b/Source/CTest/cmCTestHandlerCommand.h
index 79d61f3..5bbc569 100644
--- a/Source/CTest/cmCTestHandlerCommand.h
+++ b/Source/CTest/cmCTestHandlerCommand.h
@@ -5,9 +5,9 @@
#include "cmConfigure.h" // IWYU pragma: keep
+#include "cmArgumentParser.h"
#include "cmCTestCommand.h"
-#include <stddef.h>
#include <string>
#include <vector>
@@ -19,11 +19,11 @@ class cmExecutionStatus;
*
* cmCTestHandlerCommand defineds the command to test the project.
*/
-class cmCTestHandlerCommand : public cmCTestCommand
+class cmCTestHandlerCommand
+ : public cmCTestCommand
+ , public cmArgumentParser<void>
{
public:
- cmCTestHandlerCommand();
-
/**
* The name of the command as specified in CMakeList.txt.
*/
@@ -36,42 +36,22 @@ public:
bool InitialPass(std::vector<std::string> const& args,
cmExecutionStatus& status) override;
- enum
- {
- ct_NONE,
- ct_RETURN_VALUE,
- ct_CAPTURE_CMAKE_ERROR,
- ct_BUILD,
- ct_SOURCE,
- ct_SUBMIT_INDEX,
- ct_LAST
- };
-
protected:
virtual cmCTestGenericHandler* InitializeHandler() = 0;
virtual void ProcessAdditionalValues(cmCTestGenericHandler* handler);
// Command argument handling.
- virtual bool CheckArgumentKeyword(std::string const& arg);
- virtual bool CheckArgumentValue(std::string const& arg);
- enum
- {
- ArgumentDoingNone,
- ArgumentDoingError,
- ArgumentDoingKeyword,
- ArgumentDoingLast1
- };
- int ArgumentDoing;
- unsigned int ArgumentIndex;
-
- bool AppendXML;
- bool Quiet;
-
- std::string ReturnVariable;
- std::vector<const char*> Arguments;
- std::vector<const char*> Values;
- size_t Last;
+ virtual void BindArguments();
+ virtual void CheckArguments(std::vector<std::string> const& keywords);
+
+ bool Append = false;
+ bool Quiet = false;
+ std::string CaptureCMakeError;
+ std::string ReturnValue;
+ std::string Build;
+ std::string Source;
+ std::string SubmitIndex;
};
#define CTEST_COMMAND_APPEND_OPTION_DOCS \