cmLinkLineComputer.h 1.87 KB
Newer Older
1 2 3 4 5 6
/* Distributed under the OSI-approved BSD 3-Clause License.  See accompanying
   file Copyright.txt or https://cmake.org/licensing for details.  */

#ifndef cmLinkLineComputer_h
#define cmLinkLineComputer_h

7
#include "cmConfigure.h" // IWYU pragma: keep
8 9 10

#include <string>

11
#include "cmStateDirectory.h"
12

13
class cmComputeLinkInformation;
14
class cmGeneratorTarget;
15 16
class cmOutputConverter;

17 18 19
class cmLinkLineComputer
{
public:
20
  cmLinkLineComputer(cmOutputConverter* outputConverter,
21
                     cmStateDirectory const& stateDir);
22 23
  virtual ~cmLinkLineComputer();

wahikihiki's avatar
wahikihiki committed
24 25 26
  cmLinkLineComputer(cmLinkLineComputer const&) = delete;
  cmLinkLineComputer& operator=(cmLinkLineComputer const&) = delete;

27 28
  void SetUseWatcomQuote(bool useWatcomQuote);
  void SetForResponse(bool forResponse);
29
  void SetRelink(bool relink);
30

31 32
  virtual std::string ConvertToLinkReference(std::string const& input) const;

33 34 35 36
  std::string ComputeLinkPath(cmComputeLinkInformation& cli,
                              std::string const& libPathFlag,
                              std::string const& libPathTerminator);

37 38 39
  std::string ComputeFrameworkPath(cmComputeLinkInformation& cli,
                                   std::string const& fwSearchFlag);

40 41
  virtual std::string ComputeLinkLibraries(cmComputeLinkInformation& cli,
                                           std::string const& stdLibString);
42

43 44 45
  virtual std::string GetLinkerLanguage(cmGeneratorTarget* target,
                                        std::string const& config);

46
protected:
47 48 49
  std::string ComputeLinkLibs(cmComputeLinkInformation& cli);
  std::string ComputeRPath(cmComputeLinkInformation& cli);

50
  std::string ConvertToOutputFormat(std::string const& input);
51
  std::string ConvertToOutputForExisting(std::string const& input);
52

53
  cmStateDirectory StateDir;
54 55 56 57
  cmOutputConverter* OutputConverter;

  bool ForResponse;
  bool UseWatcomQuote;
58
  bool Relink;
59 60 61
};

#endif