cmCTestBuildAndTestHandler.h 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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, std::ostringstream &out,
  41. std::string &cmakeOutString,
  42. std::string &cwd, cmake *cm);
  43. std::string Output;
  44. std::string BuildGenerator;
  45. std::string BuildGeneratorPlatform;
  46. std::string BuildGeneratorToolset;
  47. std::vector<std::string> BuildOptions;
  48. bool BuildTwoConfig;
  49. std::string BuildMakeProgram;
  50. std::string ConfigSample;
  51. std::string SourceDir;
  52. std::string BinaryDir;
  53. std::string BuildProject;
  54. std::string TestCommand;
  55. bool BuildNoClean;
  56. std::string BuildRunDir;
  57. std::string ExecutableDirectory;
  58. std::vector<std::string> TestCommandArgs;
  59. std::vector<std::string> BuildTargets;
  60. bool BuildNoCMake;
  61. double Timeout;
  62. };
  63. #endif