cmInstallCxxModuleBmiGenerator.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
  2. file Copyright.txt or https://cmake.org/licensing for details. */
  3. #pragma once
  4. #include "cmConfigure.h" // IWYU pragma: keep
  5. #include <iosfwd>
  6. #include <string>
  7. #include <vector>
  8. #include "cmInstallGenerator.h"
  9. class cmGeneratorTarget;
  10. class cmListFileBacktrace;
  11. class cmLocalGenerator;
  12. /** \class cmInstallCxxModuleBmiGenerator
  13. * \brief Generate C++ module BMI installation rules.
  14. */
  15. class cmInstallCxxModuleBmiGenerator : public cmInstallGenerator
  16. {
  17. public:
  18. cmInstallCxxModuleBmiGenerator(
  19. std::string target, std::string const& dest, std::string file_permissions,
  20. std::vector<std::string> const& configurations,
  21. std::string const& component, MessageLevel message, bool exclude_from_all,
  22. bool optional, cmListFileBacktrace backtrace);
  23. ~cmInstallCxxModuleBmiGenerator() override;
  24. bool Compute(cmLocalGenerator* lg) override;
  25. std::string const& GetFilePermissions() const
  26. {
  27. return this->FilePermissions;
  28. }
  29. std::string GetDestination(std::string const& config) const;
  30. std::string GetScriptLocation(std::string const& config) const;
  31. cmGeneratorTarget const* GetTarget() const { return this->Target; }
  32. bool GetOptional() const { return this->Optional; }
  33. MessageLevel GetMessageLevel() const { return this->Message; }
  34. protected:
  35. void GenerateScriptForConfig(std::ostream& os, const std::string& config,
  36. Indent indent) override;
  37. std::string const TargetName;
  38. cmGeneratorTarget const* Target = nullptr;
  39. cmLocalGenerator* LocalGenerator = nullptr;
  40. std::string const FilePermissions;
  41. bool const Optional;
  42. };