1 /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
2 file Copyright.txt or https://cmake.org/licensing for details. */
6 #include "cmConfigure.h" // IWYU pragma: keep
11 #include "cmStateDirectory.h"
13 class cmComputeLinkInformation;
14 class cmGeneratorTarget;
15 class cmOutputConverter;
19 class cmLinkLineComputer
22 cmLinkLineComputer(cmOutputConverter* outputConverter,
23 cmStateDirectory const& stateDir);
24 virtual ~cmLinkLineComputer();
26 cmLinkLineComputer(cmLinkLineComputer const&) = delete;
27 cmLinkLineComputer& operator=(cmLinkLineComputer const&) = delete;
29 void SetUseWatcomQuote(bool useWatcomQuote);
30 void SetUseNinjaMulti(bool useNinjaMulti);
31 void SetForResponse(bool forResponse);
32 void SetRelink(bool relink);
34 virtual std::string ConvertToLinkReference(std::string const& input) const;
36 std::string ComputeLinkPath(cmComputeLinkInformation& cli,
37 std::string const& libPathFlag,
38 std::string const& libPathTerminator);
40 void ComputeLinkPath(cmComputeLinkInformation& cli,
41 std::string const& libPathFlag,
42 std::string const& libPathTerminator,
43 std::vector<BT<std::string>>& linkPath);
45 std::string ComputeFrameworkPath(cmComputeLinkInformation& cli,
46 std::string const& fwSearchFlag);
48 std::string ComputeLinkLibraries(cmComputeLinkInformation& cli,
49 std::string const& stdLibString);
51 virtual void ComputeLinkLibraries(
52 cmComputeLinkInformation& cli, std::string const& stdLibString,
53 std::vector<BT<std::string>>& linkLibraries);
55 virtual std::string GetLinkerLanguage(cmGeneratorTarget* target,
56 std::string const& config);
59 std::string ComputeLinkLibs(cmComputeLinkInformation& cli);
60 void ComputeLinkLibs(cmComputeLinkInformation& cli,
61 std::vector<BT<std::string>>& linkLibraries);
62 std::string ComputeRPath(cmComputeLinkInformation& cli);
64 std::string ConvertToOutputFormat(std::string const& input);
65 std::string ConvertToOutputForExisting(std::string const& input);
67 cmStateDirectory StateDir;
68 cmOutputConverter* OutputConverter;
70 bool ForResponse = false;
71 bool UseWatcomQuote = false;
72 bool UseNinjaMulti = false;