cmMakefileLibraryTargetGenerator.h 1.5 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. #pragma once
  4. #include "cmConfigure.h" // IWYU pragma: keep
  5. #include <string>
  6. #include <vector>
  7. #include "cmMakefileTargetGenerator.h"
  8. class cmGeneratorTarget;
  9. class cmMakefileLibraryTargetGenerator : public cmMakefileTargetGenerator
  10. {
  11. public:
  12. cmMakefileLibraryTargetGenerator(cmGeneratorTarget* target);
  13. ~cmMakefileLibraryTargetGenerator() override;
  14. /* the main entry point for this class. Writes the Makefiles associated
  15. with this target */
  16. void WriteRuleFiles() override;
  17. protected:
  18. void WriteObjectLibraryRules();
  19. void WriteStaticLibraryRules();
  20. void WriteSharedLibraryRules(bool relink);
  21. void WriteModuleLibraryRules(bool relink);
  22. void WriteDeviceLibraryRules(const std::string& linkRule, bool relink);
  23. void WriteNvidiaDeviceLibraryRules(const std::string& linkRuleVar,
  24. bool relink,
  25. std::vector<std::string>& commands,
  26. const std::string& targetOutput);
  27. void WriteLibraryRules(const std::string& linkRule,
  28. const std::string& extraFlags, bool relink);
  29. // MacOSX Framework support methods
  30. void WriteFrameworkRules(bool relink);
  31. // Store the computd framework version for OS X Frameworks.
  32. std::string FrameworkVersion;
  33. private:
  34. std::string DeviceLinkObject;
  35. };