cmCTestStartCommand.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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 cmCTestStartCommand_h
  11. #define cmCTestStartCommand_h
  12. #include "cmCTestCommand.h"
  13. /** \class cmCTestStart
  14. * \brief Run a ctest script
  15. *
  16. * cmCTestStartCommand defineds the command to start the nightly testing.
  17. */
  18. class cmCTestStartCommand : public cmCTestCommand
  19. {
  20. public:
  21. cmCTestStartCommand();
  22. /**
  23. * This is a virtual constructor for the command.
  24. */
  25. virtual cmCommand* Clone()
  26. {
  27. cmCTestStartCommand* ni = new cmCTestStartCommand;
  28. ni->CTest = this->CTest;
  29. ni->CTestScriptHandler = this->CTestScriptHandler;
  30. ni->CreateNewTag = this->CreateNewTag;
  31. ni->Quiet = this->Quiet;
  32. return ni;
  33. }
  34. /**
  35. * This is called when the command is first encountered in
  36. * the CMakeLists.txt file.
  37. */
  38. virtual bool InitialPass(std::vector<std::string> const& args,
  39. cmExecutionStatus& status);
  40. /**
  41. * Will this invocation of ctest_start create a new TAG file?
  42. */
  43. bool ShouldCreateNewTag() { return this->CreateNewTag; }
  44. /**
  45. * Should this invocation of ctest_start output non-error messages?
  46. */
  47. bool ShouldBeQuiet() { return this->Quiet; }
  48. /**
  49. * The name of the command as specified in CMakeList.txt.
  50. */
  51. virtual std::string GetName() const { return "ctest_start"; }
  52. cmTypeMacro(cmCTestStartCommand, cmCTestCommand);
  53. private:
  54. bool InitialCheckout(std::ostream& ofs, std::string const& sourceDir);
  55. bool CreateNewTag;
  56. bool Quiet;
  57. };
  58. #endif