summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-06-16 14:55:33 (GMT)
committerBrad King <brad.king@kitware.com>2014-06-23 13:17:07 (GMT)
commit4dad5fd20bfa330b3131fd5cafa709d85c1b58ec (patch)
treebd84862a96220c5e505c095ebb21f7bf8132ef9a /Source/cmTarget.h
parenta272344228174958a8b2346793d3272eb432dad8 (diff)
downloadCMake-4dad5fd20bfa330b3131fd5cafa709d85c1b58ec.zip
CMake-4dad5fd20bfa330b3131fd5cafa709d85c1b58ec.tar.gz
CMake-4dad5fd20bfa330b3131fd5cafa709d85c1b58ec.tar.bz2
cmTarget: Add cmLinkItem to refer to a target by name and pointer
Many items named in target_link_libraries calls are targets, but not all. Create a cmLinkItem type that acts like std::string so it can name an item but also has a pointer to a cmTarget that is the result of looking up the item name in the referencing target's scope. This will be useful to avoid duplicate lookup operations later.
Diffstat (limited to 'Source/cmTarget.h')
-rw-r--r--Source/cmTarget.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/Source/cmTarget.h b/Source/cmTarget.h
index 049d3ea..97c8bf0 100644
--- a/Source/cmTarget.h
+++ b/Source/cmTarget.h
@@ -43,6 +43,18 @@ class cmTarget;
class cmGeneratorTarget;
class cmTargetTraceDependencies;
+// Basic information about each link item.
+class cmLinkItem: public std::string
+{
+ typedef std::string std_string;
+public:
+ cmLinkItem(): std_string(), Target(0) {}
+ cmLinkItem(const std_string& n,
+ cmTarget const* t): std_string(n), Target(t) {}
+ cmLinkItem(cmLinkItem const& r): std_string(r), Target(r.Target) {}
+ cmTarget const* Target;
+};
+
struct cmTargetLinkInformationMap:
public std::map<std::string, cmComputeLinkInformation*>
{