cmTestGenerator.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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,
  26. Indent const& indent) CM_OVERRIDE;
  27. void GenerateScriptActions(std::ostream& os,
  28. Indent const& indent) CM_OVERRIDE;
  29. void GenerateScriptForConfig(std::ostream& os, const std::string& config,
  30. Indent const& indent) CM_OVERRIDE;
  31. void GenerateScriptNoConfig(std::ostream& os,
  32. Indent const& indent) CM_OVERRIDE;
  33. bool NeedsScriptNoConfig() const CM_OVERRIDE;
  34. void GenerateOldStyle(std::ostream& os, Indent const& indent);
  35. cmLocalGenerator* LG;
  36. cmTest* Test;
  37. bool TestGenerated;
  38. };
  39. #endif