cmCTestGenericHandler.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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. 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 cmCTestGenericHandler_h
  14. #define cmCTestGenericHandler_h
  15. #include "cmStandardIncludes.h"
  16. class cmCTest;
  17. class cmMakefile;
  18. /** \class cmCTestGenericHandler
  19. * \brief A superclass of all CTest Handlers
  20. *
  21. */
  22. class cmCTestGenericHandler
  23. {
  24. public:
  25. /**
  26. * If verbose then more informaiton is printed out
  27. */
  28. void SetVerbose(bool val) { m_Verbose = val; }
  29. /**
  30. * Populate internals from CTest custom scripts
  31. */
  32. virtual void PopulateCustomVectors(cmMakefile *) {}
  33. /**
  34. * Do the actual processing. Subclass has to override it.
  35. * Return < 0 if error.
  36. */
  37. virtual int ProcessHandler() = 0;
  38. /**
  39. * Set the CTest instance
  40. */
  41. void SetCTestInstance(cmCTest* ctest) { m_CTest = ctest; }
  42. /**
  43. * Construct handler
  44. */
  45. cmCTestGenericHandler();
  46. virtual ~cmCTestGenericHandler();
  47. typedef std::map<cmStdString,cmStdString> t_StringToString;
  48. void SetOption(const char* op, const char* value);
  49. const char* GetOption(const char* op);
  50. protected:
  51. bool m_Verbose;
  52. cmCTest *m_CTest;
  53. t_StringToString m_Options;
  54. };
  55. #endif