cmCTestStartCommand.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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. return ni;
  32. }
  33. /**
  34. * This is called when the command is first encountered in
  35. * the CMakeLists.txt file.
  36. */
  37. virtual bool InitialPass(std::vector<std::string> const& args,
  38. cmExecutionStatus &status);
  39. /**
  40. * Will this invocation of ctest_start create a new TAG file?
  41. */
  42. bool ShouldCreateNewTag()
  43. {
  44. return this->CreateNewTag;
  45. }
  46. /**
  47. * The name of the command as specified in CMakeList.txt.
  48. */
  49. virtual const char* GetName() const { return "ctest_start";}
  50. cmTypeMacro(cmCTestStartCommand, cmCTestCommand);
  51. private:
  52. bool InitialCheckout(std::ostream& ofs, std::string const& sourceDir);
  53. bool CreateNewTag;
  54. };
  55. #endif