cmCTestHandlerCommand.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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. cmTypeMacro(cmCTestHandlerCommand, cmCTestCommand);
  32. enum
  33. {
  34. ct_NONE,
  35. ct_RETURN_VALUE,
  36. ct_BUILD,
  37. ct_SOURCE,
  38. ct_SUBMIT_INDEX,
  39. ct_LAST
  40. };
  41. protected:
  42. virtual cmCTestGenericHandler* InitializeHandler() = 0;
  43. bool ProcessArguments(std::vector<std::string> const& args,
  44. int last, const char** strings, std::vector<const char*>& values);
  45. std::string m_ReturnVariable;
  46. std::vector<const char*> m_Arguments;
  47. std::vector<const char*> m_Values;
  48. size_t m_Last;
  49. };
  50. #endif