summaryrefslogtreecommitdiff
path: root/Source/cmLinkLineComputer.h
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2016-10-08 12:21:38 +0200
committerStephen Kelly <steveire@gmail.com>2016-10-10 20:38:58 +0200
commit0c978063259fb013856b617d680cebcdee51ab1a (patch)
treec943813035b6d0a51f7d60d4c4129f4033227eaa /Source/cmLinkLineComputer.h
parent0152a01f11fc46f645fd765cc7b1be76cc07b52a (diff)
downloadcmake-0c978063259fb013856b617d680cebcdee51ab1a.tar.gz
cmLinkLineComputer: Move ComputeLinkLibs from cmLocalGenerator
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.
Diffstat (limited to 'Source/cmLinkLineComputer.h')
-rw-r--r--Source/cmLinkLineComputer.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/Source/cmLinkLineComputer.h b/Source/cmLinkLineComputer.h
index bd4c7405e8..2317385063 100644
--- a/Source/cmLinkLineComputer.h
+++ b/Source/cmLinkLineComputer.h
@@ -6,16 +6,31 @@
#include "cmState.h"
+class cmComputeLinkInformation;
+class cmOutputConverter;
+
class cmLinkLineComputer
{
public:
- cmLinkLineComputer(cmState::Directory stateDir);
+ 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