cmLinkLineComputer.h 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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 cmLinkLineComputer_h
  4. #define cmLinkLineComputer_h
  5. #include "cmConfigure.h" // IWYU pragma: keep
  6. #include <string>
  7. #include <vector>
  8. #include "cmStateDirectory.h"
  9. class cmComputeLinkInformation;
  10. class cmGeneratorTarget;
  11. class cmOutputConverter;
  12. template <typename T>
  13. class BT;
  14. class cmLinkLineComputer
  15. {
  16. public:
  17. cmLinkLineComputer(cmOutputConverter* outputConverter,
  18. cmStateDirectory const& stateDir);
  19. virtual ~cmLinkLineComputer();
  20. cmLinkLineComputer(cmLinkLineComputer const&) = delete;
  21. cmLinkLineComputer& operator=(cmLinkLineComputer const&) = delete;
  22. void SetUseWatcomQuote(bool useWatcomQuote);
  23. void SetForResponse(bool forResponse);
  24. void SetRelink(bool relink);
  25. virtual std::string ConvertToLinkReference(std::string const& input) const;
  26. std::string ComputeLinkPath(cmComputeLinkInformation& cli,
  27. std::string const& libPathFlag,
  28. std::string const& libPathTerminator);
  29. void ComputeLinkPath(cmComputeLinkInformation& cli,
  30. std::string const& libPathFlag,
  31. std::string const& libPathTerminator,
  32. std::vector<BT<std::string>>& linkPath);
  33. std::string ComputeFrameworkPath(cmComputeLinkInformation& cli,
  34. std::string const& fwSearchFlag);
  35. virtual std::string ComputeLinkLibraries(cmComputeLinkInformation& cli,
  36. std::string const& stdLibString);
  37. virtual std::string GetLinkerLanguage(cmGeneratorTarget* target,
  38. std::string const& config);
  39. protected:
  40. std::string ComputeLinkLibs(cmComputeLinkInformation& cli);
  41. void ComputeLinkLibs(cmComputeLinkInformation& cli,
  42. std::vector<BT<std::string>>& linkLibraries);
  43. std::string ComputeRPath(cmComputeLinkInformation& cli);
  44. std::string ConvertToOutputFormat(std::string const& input);
  45. std::string ConvertToOutputForExisting(std::string const& input);
  46. cmStateDirectory StateDir;
  47. cmOutputConverter* OutputConverter;
  48. bool ForResponse;
  49. bool UseWatcomQuote;
  50. bool Relink;
  51. };
  52. #endif