cmCTestUploadCommand.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. /*============================================================================
  2. CMake - Cross Platform Makefile Generator
  3. Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
  4. Distributed under the OSI-approved BSD License (the "License");
  5. see accompanying file Copyright.txt for details.
  6. This software is distributed WITHOUT ANY WARRANTY; without even the
  7. implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  8. See the License for more information.
  9. ============================================================================*/
  10. #ifndef cmCTestUploadCommand_h
  11. #define cmCTestUploadCommand_h
  12. #include "cmCTestHandlerCommand.h"
  13. #include "cmCTest.h"
  14. /** \class cmCTestUpload
  15. * \brief Run a ctest script
  16. *
  17. * cmCTestUploadCommand defines the command to upload result files for
  18. * the project.
  19. */
  20. class cmCTestUploadCommand : public cmCTestHandlerCommand
  21. {
  22. public:
  23. cmCTestUploadCommand()
  24. {
  25. }
  26. /**
  27. * This is a virtual constructor for the command.
  28. */
  29. virtual cmCommand* Clone()
  30. {
  31. cmCTestUploadCommand* ni = new cmCTestUploadCommand;
  32. ni->CTest = this->CTest;
  33. ni->CTestScriptHandler = this->CTestScriptHandler;
  34. return ni;
  35. }
  36. /**
  37. * The name of the command as specified in CMakeList.txt.
  38. */
  39. virtual const char* GetName() const { return "ctest_upload";}
  40. /**
  41. * Succinct documentation.
  42. */
  43. virtual const char* GetTerseDocumentation() const
  44. {
  45. return "Upload files to a dashboard server.";
  46. }
  47. /**
  48. * More documentation.
  49. */
  50. virtual const char* GetFullDocumentation() const
  51. {
  52. return
  53. " ctest_upload(FILES ...)\n"
  54. "Pass a list of files to be sent along with the build results to "
  55. "the dashboard server.\n";
  56. }
  57. cmTypeMacro(cmCTestUploadCommand, cmCTestHandlerCommand);
  58. protected:
  59. cmCTestGenericHandler* InitializeHandler();
  60. virtual bool CheckArgumentKeyword(std::string const& arg);
  61. virtual bool CheckArgumentValue(std::string const& arg);
  62. enum
  63. {
  64. ArgumentDoingFiles = Superclass::ArgumentDoingLast1,
  65. ArgumentDoingLast2
  66. };
  67. cmCTest::SetOfStrings Files;
  68. };
  69. #endif