cmTestGenerator.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /*============================================================================
  2. CMake - Cross Platform Makefile Generator
  3. Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
  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 cmTestGenerator_h
  11. #define cmTestGenerator_h
  12. #include "cmScriptGenerator.h"
  13. class cmTest;
  14. class cmLocalGenerator;
  15. /** \class cmTestGenerator
  16. * \brief Support class for generating install scripts.
  17. *
  18. */
  19. class cmTestGenerator: public cmScriptGenerator
  20. {
  21. public:
  22. cmTestGenerator(cmTest* test,
  23. std::vector<std::string> const&
  24. configurations = std::vector<std::string>());
  25. virtual ~cmTestGenerator();
  26. void Compute(cmLocalGenerator* lg);
  27. protected:
  28. virtual void GenerateScriptConfigs(std::ostream& os, Indent const& indent);
  29. virtual void GenerateScriptActions(std::ostream& os, Indent const& indent);
  30. virtual void GenerateScriptForConfig(std::ostream& os,
  31. const std::string& config,
  32. Indent const& indent);
  33. virtual void GenerateScriptNoConfig(std::ostream& os, Indent const& indent);
  34. virtual bool NeedsScriptNoConfig() const;
  35. void GenerateOldStyle(std::ostream& os, Indent const& indent);
  36. cmLocalGenerator* LG;
  37. cmTest* Test;
  38. bool TestGenerated;
  39. };
  40. #endif