cmCTestBuildAndTestHandler.h 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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. cmTypeMacro(cmCTestBuildAndTestHandler, cmCTestGenericHandler);
  26. /*
  27. * The main entry point for this class
  28. */
  29. int ProcessHandler();
  30. //! Set all the build and test arguments
  31. virtual int ProcessCommandLineArguments(
  32. const std::string& currentArg, size_t& idx,
  33. const std::vector<std::string>& allArgs);
  34. /*
  35. * Get the output variable
  36. */
  37. const char* GetOutput();
  38. cmCTestBuildAndTestHandler();
  39. virtual void Initialize();
  40. protected:
  41. ///! Run CMake and build a test and then run it as a single test.
  42. int RunCMakeAndTest(std::string* output);
  43. int RunCMake(std::string* outstring, cmOStringStream &out,
  44. std::string &cmakeOutString,
  45. std::string &cwd, cmake *cm);
  46. cmStdString Output;
  47. std::string BuildGenerator;
  48. std::vector<std::string> BuildOptions;
  49. bool BuildTwoConfig;
  50. std::string BuildMakeProgram;
  51. std::string ConfigSample;
  52. std::string SourceDir;
  53. std::string BinaryDir;
  54. std::string BuildProject;
  55. std::string TestCommand;
  56. bool BuildNoClean;
  57. std::string BuildRunDir;
  58. std::string ExecutableDirectory;
  59. std::vector<std::string> TestCommandArgs;
  60. std::vector<std::string> BuildTargets;
  61. bool BuildNoCMake;
  62. double Timeout;
  63. };
  64. #endif