diff options
author | Regina Pfeifer <regina@mailbox.org> | 2019-09-19 11:11:55 (GMT) |
---|---|---|
committer | Regina Pfeifer <regina@mailbox.org> | 2019-09-20 11:27:30 (GMT) |
commit | 0aa8a2ab8b00c0889df3d0fa1be47ad5a0b9db22 (patch) | |
tree | 707ea2e27d95ba423c5710bb4ecd42bce5e91023 /Source/CTest/cmCTestHandlerCommand.h | |
parent | d5a6a133680e4d5798522a4b29ae6bced1f2db3a (diff) | |
download | CMake-0aa8a2ab8b00c0889df3d0fa1be47ad5a0b9db22.zip CMake-0aa8a2ab8b00c0889df3d0fa1be47ad5a0b9db22.tar.gz CMake-0aa8a2ab8b00c0889df3d0fa1be47ad5a0b9db22.tar.bz2 |
cmCTest*Command: Port to cmArgumentParser
Diffstat (limited to 'Source/CTest/cmCTestHandlerCommand.h')
-rw-r--r-- | Source/CTest/cmCTestHandlerCommand.h | 48 |
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 \ |