diff options
author | Zach Mullen <zach.mullen@kitware.com> | 2011-03-10 20:56:55 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2011-03-15 19:07:37 (GMT) |
commit | 6b6f309c5f2fa5c327afb98ac57d0b9f4f79a980 (patch) | |
tree | c635515aeec5205a2ca99bef717b75fcc2743872 /Source/CTest | |
parent | 28cdd0a5be086004e5afedbbe5adb61be7adc9cc (diff) | |
download | CMake-6b6f309c5f2fa5c327afb98ac57d0b9f4f79a980.zip CMake-6b6f309c5f2fa5c327afb98ac57d0b9f4f79a980.tar.gz CMake-6b6f309c5f2fa5c327afb98ac57d0b9f4f79a980.tar.bz2 |
Add the FILES keyword to ctest_upload command
Diffstat (limited to 'Source/CTest')
-rw-r--r-- | Source/CTest/cmCTestUploadCommand.cxx | 36 | ||||
-rw-r--r-- | Source/CTest/cmCTestUploadCommand.h | 8 |
2 files changed, 31 insertions, 13 deletions
diff --git a/Source/CTest/cmCTestUploadCommand.cxx b/Source/CTest/cmCTestUploadCommand.cxx index 9f0954b..52fcc04 100644 --- a/Source/CTest/cmCTestUploadCommand.cxx +++ b/Source/CTest/cmCTestUploadCommand.cxx @@ -33,6 +33,11 @@ cmCTestGenericHandler* cmCTestUploadCommand::InitializeHandler() //---------------------------------------------------------------------------- bool cmCTestUploadCommand::CheckArgumentKeyword(std::string const& arg) { + if(arg == "FILES") + { + this->ArgumentDoing = ArgumentDoingFiles; + return true; + } return this->CheckArgumentValue(arg); } @@ -40,18 +45,25 @@ bool cmCTestUploadCommand::CheckArgumentKeyword(std::string const& arg) //---------------------------------------------------------------------------- bool cmCTestUploadCommand::CheckArgumentValue(std::string const& arg) { - cmStdString filename(arg); - if(cmSystemTools::FileExists(filename.c_str())) + if(this->ArgumentDoing == ArgumentDoingFiles) { - this->Files.insert(filename); - return true; - } - else - { - cmOStringStream e; - e << "File \"" << filename << "\" does not exist. Cannot submit " - << "a non-existent file."; - this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str()); - return false; + cmStdString filename(arg); + if(cmSystemTools::FileExists(filename.c_str())) + { + this->Files.insert(filename); + return true; + } + else + { + cmOStringStream e; + e << "File \"" << filename << "\" does not exist. Cannot submit " + << "a non-existent file."; + this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str()); + this->ArgumentDoing = ArgumentDoingError; + return false; + } } + + // Look for other arguments. + return this->Superclass::CheckArgumentValue(arg); } diff --git a/Source/CTest/cmCTestUploadCommand.h b/Source/CTest/cmCTestUploadCommand.h index b8c9d9f..6c2a4c2 100644 --- a/Source/CTest/cmCTestUploadCommand.h +++ b/Source/CTest/cmCTestUploadCommand.h @@ -59,7 +59,7 @@ public: virtual const char* GetFullDocumentation() { return - " ctest_upload(...)\n" + " ctest_upload(FILES ...)\n" "Pass a list of files to be sent along with the build results to " "the dashboard server.\n"; } @@ -72,6 +72,12 @@ protected: virtual bool CheckArgumentKeyword(std::string const& arg); virtual bool CheckArgumentValue(std::string const& arg); + enum + { + ArgumentDoingFiles = Superclass::ArgumentDoingLast1, + ArgumentDoingLast2 + }; + cmCTest::SetOfStrings Files; }; |