cmake/Source/cmLinkLineComputer.h

76 lines
2.5 KiB
C
Raw Normal View History

2017-04-14 19:02:05 +02:00
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
file Copyright.txt or https://cmake.org/licensing for details. */
2021-09-14 00:13:48 +02:00
#pragma once
2017-04-14 19:02:05 +02:00
2018-01-26 17:06:56 +01:00
#include "cmConfigure.h" // IWYU pragma: keep
2017-04-14 19:02:05 +02:00
#include <string>
2020-02-01 23:06:01 +01:00
#include <vector>
2017-04-14 19:02:05 +02:00
#include "cmStateDirectory.h"
2023-07-02 19:51:09 +02:00
#include "cmValue.h"
2017-04-14 19:02:05 +02:00
class cmComputeLinkInformation;
class cmGeneratorTarget;
class cmOutputConverter;
2020-02-01 23:06:01 +01:00
template <typename T>
class BT;
2017-04-14 19:02:05 +02:00
class cmLinkLineComputer
{
public:
cmLinkLineComputer(cmOutputConverter* outputConverter,
2017-07-20 19:35:53 +02:00
cmStateDirectory const& stateDir);
2017-04-14 19:02:05 +02:00
virtual ~cmLinkLineComputer();
2019-11-11 23:01:05 +01:00
cmLinkLineComputer(cmLinkLineComputer const&) = delete;
cmLinkLineComputer& operator=(cmLinkLineComputer const&) = delete;
2017-04-14 19:02:05 +02:00
void SetUseWatcomQuote(bool useWatcomQuote);
2020-08-30 11:54:41 +02:00
void SetUseNinjaMulti(bool useNinjaMulti);
2017-04-14 19:02:05 +02:00
void SetForResponse(bool forResponse);
void SetRelink(bool relink);
virtual std::string ConvertToLinkReference(std::string const& input) const;
std::string ComputeLinkPath(cmComputeLinkInformation& cli,
std::string const& libPathFlag,
std::string const& libPathTerminator);
2020-02-01 23:06:01 +01:00
void ComputeLinkPath(cmComputeLinkInformation& cli,
std::string const& libPathFlag,
std::string const& libPathTerminator,
std::vector<BT<std::string>>& linkPath);
2017-04-14 19:02:05 +02:00
std::string ComputeFrameworkPath(cmComputeLinkInformation& cli,
2023-12-07 09:12:54 +01:00
cmValue fwSearchFlag);
2017-04-14 19:02:05 +02:00
2020-02-01 23:06:01 +01:00
std::string ComputeLinkLibraries(cmComputeLinkInformation& cli,
std::string const& stdLibString);
virtual void ComputeLinkLibraries(
cmComputeLinkInformation& cli, std::string const& stdLibString,
std::vector<BT<std::string>>& linkLibraries);
2017-04-14 19:02:05 +02:00
virtual std::string GetLinkerLanguage(cmGeneratorTarget* target,
std::string const& config);
protected:
std::string ComputeLinkLibs(cmComputeLinkInformation& cli);
2020-02-01 23:06:01 +01:00
void ComputeLinkLibs(cmComputeLinkInformation& cli,
std::vector<BT<std::string>>& linkLibraries);
2017-04-14 19:02:05 +02:00
std::string ComputeRPath(cmComputeLinkInformation& cli);
std::string ConvertToOutputFormat(std::string const& input);
std::string ConvertToOutputForExisting(std::string const& input);
cmStateDirectory StateDir;
cmOutputConverter* OutputConverter;
2022-08-04 22:12:04 +02:00
bool ForResponse = false;
bool UseWatcomQuote = false;
bool UseNinjaMulti = false;
bool Relink = false;
2017-04-14 19:02:05 +02:00
};