cmCTestStartCommand.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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" // IWYU pragma: keep
  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() 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) 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. private:
  48. bool InitialCheckout(std::ostream& ofs, std::string const& sourceDir);
  49. bool CreateNewTag;
  50. bool Quiet;
  51. };
  52. #endif