mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-06 13:51:33 -06:00
Add a cmOutputConverter to the cmLinkLineComputer and factory methods to facilitate shell escapes. Add state to the cmLinkLineComputer to record whether outputting for response files or for watcom, to satisfy the cmOutputConverter API. These are constant for the lifetime of the cmLinkLineComputer, even when its functionality is extended in the future. This also keeps the signatures of cmLinkLineComputer relatively simple. Pass the cmComputeLinkInformation as a method parameter so that cmLinkLineComputer is free from target-specific state. An instance should be usable for all targets in a directory.
37 lines
893 B
C++
37 lines
893 B
C++
/* 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
|
|
|
|
#include "cmState.h"
|
|
|
|
class cmComputeLinkInformation;
|
|
class cmOutputConverter;
|
|
|
|
class cmLinkLineComputer
|
|
{
|
|
public:
|
|
cmLinkLineComputer(cmOutputConverter* outputConverter,
|
|
cmState::Directory stateDir);
|
|
virtual ~cmLinkLineComputer();
|
|
|
|
void SetUseWatcomQuote(bool useWatcomQuote);
|
|
void SetForResponse(bool forResponse);
|
|
|
|
virtual std::string ConvertToLinkReference(std::string const& input) const;
|
|
|
|
std::string ComputeLinkLibs(cmComputeLinkInformation& cli);
|
|
|
|
private:
|
|
std::string ConvertToOutputFormat(std::string const& input);
|
|
|
|
cmState::Directory StateDir;
|
|
cmOutputConverter* OutputConverter;
|
|
|
|
bool ForResponse;
|
|
bool UseWatcomQuote;
|
|
};
|
|
|
|
#endif
|