cmTestGenerator.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
  2. file Copyright.txt or https://cmake.org/licensing for details. */
  3. #ifndef cmTestGenerator_h
  4. #define cmTestGenerator_h
  5. #include "cmConfigure.h" // IWYU pragma: keep
  6. #include "cmScriptGenerator.h"
  7. #include <iosfwd>
  8. #include <string>
  9. #include <vector>
  10. class cmLocalGenerator;
  11. class cmTest;
  12. /** \class cmTestGenerator
  13. * \brief Support class for generating install scripts.
  14. *
  15. */
  16. class cmTestGenerator : public cmScriptGenerator
  17. {
  18. public:
  19. cmTestGenerator(cmTest* test,
  20. std::vector<std::string> const& configurations =
  21. std::vector<std::string>());
  22. ~cmTestGenerator() CM_OVERRIDE;
  23. void Compute(cmLocalGenerator* lg);
  24. protected:
  25. void GenerateScriptConfigs(std::ostream& os, Indent indent) CM_OVERRIDE;
  26. void GenerateScriptActions(std::ostream& os, Indent indent) CM_OVERRIDE;
  27. void GenerateScriptForConfig(std::ostream& os, const std::string& config,
  28. Indent indent) CM_OVERRIDE;
  29. void GenerateScriptNoConfig(std::ostream& os, Indent indent) CM_OVERRIDE;
  30. bool NeedsScriptNoConfig() const CM_OVERRIDE;
  31. void GenerateOldStyle(std::ostream& os, Indent indent);
  32. cmLocalGenerator* LG;
  33. cmTest* Test;
  34. bool TestGenerated;
  35. };
  36. #endif