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/cmCTestUploadCommand.cxx | |
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/cmCTestUploadCommand.cxx')
-rw-r--r-- | Source/CTest/cmCTestUploadCommand.cxx | 36 |
1 files changed, 24 insertions, 12 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); } |