cmCTestUpdateCommand.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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 cmCTestUpdateCommand_h
  11. #define cmCTestUpdateCommand_h
  12. #include "cmCTestHandlerCommand.h"
  13. /** \class cmCTestUpdate
  14. * \brief Run a ctest script
  15. *
  16. * cmCTestUpdateCommand defineds the command to updates the repository.
  17. */
  18. class cmCTestUpdateCommand : public cmCTestHandlerCommand
  19. {
  20. public:
  21. cmCTestUpdateCommand() {}
  22. /**
  23. * This is a virtual constructor for the command.
  24. */
  25. virtual cmCommand* Clone()
  26. {
  27. cmCTestUpdateCommand* ni = new cmCTestUpdateCommand;
  28. ni->CTest = this->CTest;
  29. ni->CTestScriptHandler = this->CTestScriptHandler;
  30. return ni;
  31. }
  32. /**
  33. * The name of the command as specified in CMakeList.txt.
  34. */
  35. virtual const char* GetName() { return "ctest_update";}
  36. /**
  37. * Succinct documentation.
  38. */
  39. virtual const char* GetTerseDocumentation()
  40. {
  41. return "Update the work tree from version control.";
  42. }
  43. /**
  44. * More documentation.
  45. */
  46. virtual const char* GetFullDocumentation()
  47. {
  48. return
  49. " ctest_update([SOURCE source] [RETURN_VALUE res])\n"
  50. "Updates the given source directory and stores results in Update.xml. "
  51. "If no SOURCE is given, the CTEST_SOURCE_DIRECTORY variable is used. "
  52. "The RETURN_VALUE option specifies a variable in which to store the "
  53. "result, which is the number of files updated or -1 on error."
  54. ;
  55. }
  56. cmTypeMacro(cmCTestUpdateCommand, cmCTestHandlerCommand);
  57. protected:
  58. cmCTestGenericHandler* InitializeHandler();
  59. };
  60. #endif