cmCTestBuildAndTestHandler.h 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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 cmCTestBuildAndTestHandler_h
  14. #define cmCTestBuildAndTestHandler_h
  15. #include "cmCTestGenericHandler.h"
  16. #include "cmListFileCache.h"
  17. class cmake;
  18. /** \class cmCTestBuildAndTestHandler
  19. * \brief A class that handles ctest -S invocations
  20. *
  21. */
  22. class cmCTestBuildAndTestHandler : public cmCTestGenericHandler
  23. {
  24. public:
  25. /*
  26. * The main entry point for this class
  27. */
  28. int ProcessHandler();
  29. //! Set all the build and test arguments
  30. virtual int ProcessCommandLineArguments(
  31. const std::string& currentArg, size_t& idx,
  32. const std::vector<std::string>& allArgs);
  33. /*
  34. * Get the output variable
  35. */
  36. const char* GetOutput();
  37. cmCTestBuildAndTestHandler();
  38. protected:
  39. ///! Run CMake and build a test and then run it as a single test.
  40. int RunCMakeAndTest(std::string* output);
  41. int RunCMake(std::string* outstring, cmOStringStream &out,
  42. std::string &cmakeOutString,
  43. std::string &cwd, cmake *cm);
  44. cmStdString m_Output;
  45. std::string m_BuildGenerator;
  46. std::vector<std::string> m_BuildOptions;
  47. bool m_BuildTwoConfig;
  48. std::string m_BuildMakeProgram;
  49. std::string m_SourceDir;
  50. std::string m_BinaryDir;
  51. std::string m_BuildProject;
  52. std::string m_TestCommand;
  53. bool m_BuildNoClean;
  54. std::string m_BuildRunDir;
  55. std::string m_ExecutableDirectory;
  56. std::vector<std::string> m_TestCommandArgs;
  57. std::string m_BuildTarget;
  58. bool m_BuildNoCMake;
  59. };
  60. #endif