cmCTestBuildAndTestHandler.h 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. /*============================================================================
  2. CMake - Cross Platform Makefile Generator
  3. Copyright 2000-2009 Kitware, Inc.
  4. Distributed under the OSI-approved BSD License (the "License");
  5. see accompanying file Copyright.txt for details.
  6. This software is distributed WITHOUT ANY WARRANTY; without even the
  7. implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  8. See the License for more information.
  9. ============================================================================*/
  10. #ifndef cmCTestBuildAndTestHandler_h
  11. #define cmCTestBuildAndTestHandler_h
  12. #include "cmCTestGenericHandler.h"
  13. #include "cmListFileCache.h"
  14. class cmake;
  15. /** \class cmCTestBuildAndTestHandler
  16. * \brief A class that handles ctest -S invocations
  17. *
  18. */
  19. class cmCTestBuildAndTestHandler : public cmCTestGenericHandler
  20. {
  21. public:
  22. cmTypeMacro(cmCTestBuildAndTestHandler, cmCTestGenericHandler);
  23. /*
  24. * The main entry point for this class
  25. */
  26. int ProcessHandler();
  27. //! Set all the build and test arguments
  28. virtual int ProcessCommandLineArguments(
  29. const std::string& currentArg, size_t& idx,
  30. const std::vector<std::string>& allArgs);
  31. /*
  32. * Get the output variable
  33. */
  34. const char* GetOutput();
  35. cmCTestBuildAndTestHandler();
  36. virtual void Initialize();
  37. protected:
  38. ///! Run CMake and build a test and then run it as a single test.
  39. int RunCMakeAndTest(std::string* output);
  40. int RunCMake(std::string* outstring, cmOStringStream &out,
  41. std::string &cmakeOutString,
  42. std::string &cwd, cmake *cm);
  43. cmStdString Output;
  44. std::string BuildGenerator;
  45. std::string BuildGeneratorToolset;
  46. std::vector<std::string> BuildOptions;
  47. bool BuildTwoConfig;
  48. std::string BuildMakeProgram;
  49. std::string ConfigSample;
  50. std::string SourceDir;
  51. std::string BinaryDir;
  52. std::string BuildProject;
  53. std::string TestCommand;
  54. bool BuildNoClean;
  55. std::string BuildRunDir;
  56. std::string ExecutableDirectory;
  57. std::vector<std::string> TestCommandArgs;
  58. std::vector<std::string> BuildTargets;
  59. bool BuildNoCMake;
  60. double Timeout;
  61. };
  62. #endif