cmCTestStartCommand.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
  2. file Copyright.txt or https://cmake.org/licensing for details. */
  3. #ifndef cmCTestStartCommand_h
  4. #define cmCTestStartCommand_h
  5. #include <cmConfigure.h>
  6. #include "cmCTestCommand.h"
  7. #include <iosfwd>
  8. #include <string>
  9. #include <vector>
  10. class cmCommand;
  11. class cmExecutionStatus;
  12. /** \class cmCTestStart
  13. * \brief Run a ctest script
  14. *
  15. * cmCTestStartCommand defineds the command to start the nightly testing.
  16. */
  17. class cmCTestStartCommand : public cmCTestCommand
  18. {
  19. public:
  20. cmCTestStartCommand();
  21. /**
  22. * This is a virtual constructor for the command.
  23. */
  24. cmCommand* Clone() CM_OVERRIDE
  25. {
  26. cmCTestStartCommand* ni = new cmCTestStartCommand;
  27. ni->CTest = this->CTest;
  28. ni->CTestScriptHandler = this->CTestScriptHandler;
  29. ni->CreateNewTag = this->CreateNewTag;
  30. ni->Quiet = this->Quiet;
  31. return ni;
  32. }
  33. /**
  34. * This is called when the command is first encountered in
  35. * the CMakeLists.txt file.
  36. */
  37. bool InitialPass(std::vector<std::string> const& args,
  38. cmExecutionStatus& status) CM_OVERRIDE;
  39. /**
  40. * Will this invocation of ctest_start create a new TAG file?
  41. */
  42. bool ShouldCreateNewTag() { return this->CreateNewTag; }
  43. /**
  44. * Should this invocation of ctest_start output non-error messages?
  45. */
  46. bool ShouldBeQuiet() { return this->Quiet; }
  47. /**
  48. * The name of the command as specified in CMakeList.txt.
  49. */
  50. std::string GetName() const CM_OVERRIDE { return "ctest_start"; }
  51. private:
  52. bool InitialCheckout(std::ostream& ofs, std::string const& sourceDir);
  53. bool CreateNewTag;
  54. bool Quiet;
  55. };
  56. #endif