diff options
author | Brad King <brad.king@kitware.com> | 2009-01-12 14:10:47 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2009-01-12 14:10:47 (GMT) |
commit | ae2c4143d288624b6703085602ecee2289b3ee27 (patch) | |
tree | 25365a4244d6d426b65e7407e9f2161db484433d /Source/CTest/cmCTestHandlerCommand.h | |
parent | 02fb5880c18e95a4cd94f8fde2b3ded06c191fd5 (diff) | |
download | CMake-ae2c4143d288624b6703085602ecee2289b3ee27.zip CMake-ae2c4143d288624b6703085602ecee2289b3ee27.tar.gz CMake-ae2c4143d288624b6703085602ecee2289b3ee27.tar.bz2 |
ENH: Refactor CTest command argument handling
The previous approach to handling of arguments to ctest_* commands
worked only for keyword/value arguments with a single value. This
refactors the approach to allow some commands to define alternative
argument forms.
Diffstat (limited to 'Source/CTest/cmCTestHandlerCommand.h')
-rw-r--r-- | Source/CTest/cmCTestHandlerCommand.h | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/Source/CTest/cmCTestHandlerCommand.h b/Source/CTest/cmCTestHandlerCommand.h index 727437b..8c2e651 100644 --- a/Source/CTest/cmCTestHandlerCommand.h +++ b/Source/CTest/cmCTestHandlerCommand.h @@ -52,8 +52,19 @@ public: protected: virtual cmCTestGenericHandler* InitializeHandler() = 0; - bool ProcessArguments(std::vector<std::string> const& args, - int last, const char** strings, std::vector<const char*>& values); + + // 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; std::string ReturnVariable; std::vector<const char*> Arguments; |