cmCTestHandlerCommand.h 2.1 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 cmCTestHandlerCommand_h
  11. #define cmCTestHandlerCommand_h
  12. #include "cmCTestCommand.h"
  13. class cmCTestGenericHandler;
  14. /** \class cmCTestHandler
  15. * \brief Run a ctest script
  16. *
  17. * cmCTestHandlerCommand defineds the command to test the project.
  18. */
  19. class cmCTestHandlerCommand : public cmCTestCommand
  20. {
  21. public:
  22. cmCTestHandlerCommand();
  23. /**
  24. * This is called when the command is first encountered in
  25. * the CMakeLists.txt file.
  26. */
  27. virtual bool InitialPass(std::vector<std::string> const& args,
  28. cmExecutionStatus &status);
  29. cmTypeMacro(cmCTestHandlerCommand, cmCTestCommand);
  30. enum
  31. {
  32. ct_NONE,
  33. ct_RETURN_VALUE,
  34. ct_BUILD,
  35. ct_SOURCE,
  36. ct_SUBMIT_INDEX,
  37. ct_LAST
  38. };
  39. protected:
  40. virtual cmCTestGenericHandler* InitializeHandler() = 0;
  41. // Command argument handling.
  42. virtual bool CheckArgumentKeyword(std::string const& arg);
  43. virtual bool CheckArgumentValue(std::string const& arg);
  44. enum
  45. {
  46. ArgumentDoingNone,
  47. ArgumentDoingError,
  48. ArgumentDoingKeyword,
  49. ArgumentDoingLast1
  50. };
  51. int ArgumentDoing;
  52. unsigned int ArgumentIndex;
  53. bool AppendXML;
  54. bool Quiet;
  55. std::string ReturnVariable;
  56. std::vector<const char*> Arguments;
  57. std::vector<const char*> Values;
  58. size_t Last;
  59. };
  60. #define CTEST_COMMAND_APPEND_OPTION_DOCS \
  61. "The APPEND option marks results for append to those previously " \
  62. "submitted to a dashboard server since the last ctest_start. " \
  63. "Append semantics are defined by the dashboard server in use."
  64. #endif