cmCTestStartCommand.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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()
  44. {
  45. return this->CreateNewTag;
  46. }
  47. /**
  48. * Should this invocation of ctest_start output non-error messages?
  49. */
  50. bool ShouldBeQuiet()
  51. {
  52. return this->Quiet;
  53. }
  54. /**
  55. * The name of the command as specified in CMakeList.txt.
  56. */
  57. virtual std::string GetName() const { return "ctest_start";}
  58. cmTypeMacro(cmCTestStartCommand, cmCTestCommand);
  59. private:
  60. bool InitialCheckout(std::ostream& ofs, std::string const& sourceDir);
  61. bool CreateNewTag;
  62. bool Quiet;
  63. };
  64. #endif