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"
14 class cmComputeLinkInformation
;
15 class cmGeneratorTarget
;
16 class cmOutputConverter
;
20 class cmLinkLineComputer
23 cmLinkLineComputer(cmOutputConverter
* outputConverter
,
24 cmStateDirectory
const& stateDir
);
25 virtual ~cmLinkLineComputer();
27 cmLinkLineComputer(cmLinkLineComputer
const&) = delete;
28 cmLinkLineComputer
& operator=(cmLinkLineComputer
const&) = delete;
30 void SetUseWatcomQuote(bool useWatcomQuote
);
31 void SetUseNinjaMulti(bool useNinjaMulti
);
32 void SetForResponse(bool forResponse
);
33 void SetRelink(bool relink
);
35 virtual std::string
ConvertToLinkReference(std::string
const& input
) const;
37 std::string
ComputeLinkPath(cmComputeLinkInformation
& cli
,
38 std::string
const& libPathFlag
,
39 std::string
const& libPathTerminator
,
40 std::string
const& stdLinkDirString
);
42 void ComputeLinkPath(cmComputeLinkInformation
& cli
,
43 std::string
const& libPathFlag
,
44 std::string
const& libPathTerminator
,
45 std::string
const& stdLinkDirString
,
46 std::vector
<BT
<std::string
>>& linkPath
);
48 std::string
ComputeFrameworkPath(cmComputeLinkInformation
& cli
,
49 cmValue fwSearchFlag
);
51 std::string
ComputeLinkLibraries(cmComputeLinkInformation
& cli
,
52 std::string
const& stdLibString
);
54 virtual void ComputeLinkLibraries(
55 cmComputeLinkInformation
& cli
, std::string
const& stdLibString
,
56 std::vector
<BT
<std::string
>>& linkLibraries
);
58 virtual std::string
GetLinkerLanguage(cmGeneratorTarget
* target
,
59 std::string
const& config
);
62 std::string
ComputeLinkLibs(cmComputeLinkInformation
& cli
);
63 void ComputeLinkLibs(cmComputeLinkInformation
& cli
,
64 std::vector
<BT
<std::string
>>& linkLibraries
);
65 std::string
ComputeRPath(cmComputeLinkInformation
& cli
);
67 std::string
ConvertToOutputFormat(std::string
const& input
);
68 std::string
ConvertToOutputForExisting(std::string
const& input
);
70 cmStateDirectory StateDir
;
71 cmOutputConverter
* OutputConverter
;
73 bool ForResponse
= false;
74 bool UseWatcomQuote
= false;
75 bool UseNinjaMulti
= false;