1
0

cmCTestBuildAndTestHandler.h 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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::vector<std::string> BuildOptions;
  46. bool BuildTwoConfig;
  47. std::string BuildMakeProgram;
  48. std::string ConfigSample;
  49. std::string SourceDir;
  50. std::string BinaryDir;
  51. std::string BuildProject;
  52. std::string TestCommand;
  53. bool BuildNoClean;
  54. std::string BuildRunDir;
  55. std::string ExecutableDirectory;
  56. std::vector<std::string> TestCommandArgs;
  57. std::vector<std::string> BuildTargets;
  58. bool BuildNoCMake;
  59. double Timeout;
  60. };
  61. #endif