cmCTestBuildHandler.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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 cmCTestBuildHandler_h
  14. #define cmCTestBuildHandler_h
  15. #include "cmStandardIncludes.h"
  16. #include "cmListFileCache.h"
  17. class cmCTest;
  18. class cmMakefile;
  19. /** \class cmCTestBuildHandler
  20. * \brief A class that handles ctest -S invocations
  21. *
  22. */
  23. class cmCTestBuildHandler
  24. {
  25. public:
  26. /*
  27. * The main entry point for this class
  28. */
  29. int BuildDirectory(cmCTest *);
  30. /*
  31. * If verbose then more informaiton is printed out
  32. */
  33. void SetVerbose(bool val) { m_Verbose = val; }
  34. cmCTestBuildHandler();
  35. void PopulateCustomVectors(cmMakefile *mf);
  36. private:
  37. struct cmCTestBuildErrorWarning
  38. {
  39. bool m_Error;
  40. int m_LogLine;
  41. std::string m_Text;
  42. std::string m_SourceFile;
  43. std::string m_SourceFileTail;
  44. int m_LineNumber;
  45. std::string m_PreContext;
  46. std::string m_PostContext;
  47. };
  48. // generate the XML output
  49. void GenerateDartBuildOutput(std::ostream& os,
  50. std::vector<cmCTestBuildErrorWarning>,
  51. double elapsed_time);
  52. bool m_Verbose;
  53. cmCTest *m_CTest;
  54. std::string m_StartBuild;
  55. std::string m_EndBuild;
  56. std::vector<cmStdString> m_CustomErrorMatches;
  57. std::vector<cmStdString> m_CustomErrorExceptions;
  58. std::vector<cmStdString> m_CustomWarningMatches;
  59. std::vector<cmStdString> m_CustomWarningExceptions;
  60. };
  61. #endif