cmCTestHandlerCommand.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. /*=========================================================================
  2. Program: CMake - Cross-Platform Makefile Generator
  3. Module: $RCSfile$
  4. Language: C++
  5. Date: $Date$
  6. Version: $Revision$
  7. Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
  8. See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
  9. This software is distributed WITHOUT ANY WARRANTY; without even
  10. the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  11. PURPOSE. See the above copyright notices for more information.
  12. =========================================================================*/
  13. #ifndef cmCTestHandlerCommand_h
  14. #define cmCTestHandlerCommand_h
  15. #include "cmCTestCommand.h"
  16. class cmCTestGenericHandler;
  17. /** \class cmCTestHandler
  18. * \brief Run a ctest script
  19. *
  20. * cmCTestHandlerCommand defineds the command to test the project.
  21. */
  22. class cmCTestHandlerCommand : public cmCTestCommand
  23. {
  24. public:
  25. cmCTestHandlerCommand();
  26. /**
  27. * This is called when the command is first encountered in
  28. * the CMakeLists.txt file.
  29. */
  30. virtual bool InitialPass(std::vector<std::string> const& args,
  31. cmExecutionStatus &status);
  32. cmTypeMacro(cmCTestHandlerCommand, cmCTestCommand);
  33. enum
  34. {
  35. ct_NONE,
  36. ct_RETURN_VALUE,
  37. ct_BUILD,
  38. ct_SOURCE,
  39. ct_SUBMIT_INDEX,
  40. ct_LAST
  41. };
  42. protected:
  43. virtual cmCTestGenericHandler* InitializeHandler() = 0;
  44. bool ProcessArguments(std::vector<std::string> const& args,
  45. int last, const char** strings, std::vector<const char*>& values);
  46. std::string ReturnVariable;
  47. std::vector<const char*> Arguments;
  48. std::vector<const char*> Values;
  49. size_t Last;
  50. };
  51. #endif