cmInstallCxxModuleBmiGenerator.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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. #include "cmScriptGenerator.h"
  10. class cmGeneratorTarget;
  11. class cmListFileBacktrace;
  12. class cmLocalGenerator;
  13. /** \class cmInstallCxxModuleBmiGenerator
  14. * \brief Generate C++ module BMI installation rules.
  15. */
  16. class cmInstallCxxModuleBmiGenerator : public cmInstallGenerator
  17. {
  18. public:
  19. cmInstallCxxModuleBmiGenerator(
  20. std::string target, std::string const& dest, std::string file_permissions,
  21. std::vector<std::string> const& configurations,
  22. std::string const& component, MessageLevel message, bool exclude_from_all,
  23. bool optional, cmListFileBacktrace backtrace);
  24. ~cmInstallCxxModuleBmiGenerator() override;
  25. bool Compute(cmLocalGenerator* lg) override;
  26. std::string const& GetFilePermissions() const
  27. {
  28. return this->FilePermissions;
  29. }
  30. std::string GetDestination(std::string const& config) const;
  31. std::string GetScriptLocation(std::string const& config) const;
  32. cmGeneratorTarget const* GetTarget() const { return this->Target; }
  33. bool GetOptional() const { return this->Optional; }
  34. MessageLevel GetMessageLevel() const { return this->Message; }
  35. protected:
  36. void GenerateScriptForConfig(std::ostream& os, const std::string& config,
  37. Indent indent) override;
  38. std::string const TargetName;
  39. cmGeneratorTarget const* Target = nullptr;
  40. cmLocalGenerator* LocalGenerator = nullptr;
  41. std::string const FilePermissions;
  42. bool const Optional;
  43. };