summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2009-07-08 16:04:48 (GMT)
committerBrad King <brad.king@kitware.com>2009-07-08 16:04:48 (GMT)
commit7c67524dfac73bc5b8dea586bab0ce3e8206aeb7 (patch)
tree027b2394391b59f091a1426ece1541dcfeb3c2ee /Source/cmTarget.h
parentd1aa17a7b0f3b81367d4eb10e2404a5214f6890a (diff)
downloadCMake-7c67524dfac73bc5b8dea586bab0ce3e8206aeb7.zip
CMake-7c67524dfac73bc5b8dea586bab0ce3e8206aeb7.tar.gz
CMake-7c67524dfac73bc5b8dea586bab0ce3e8206aeb7.tar.bz2
ENH: Introduce cmTarget::LinkImplementation API
The new method centralizes loops that process raw OriginalLinkLibraries to extract the link implementation (libraries linked into the target) for each configuration. Results are computed on demand and then cached. This simplifies link interface computation because the default case trivially copies the link implementation.
Diffstat (limited to 'Source/cmTarget.h')
-rw-r--r--Source/cmTarget.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/Source/cmTarget.h b/Source/cmTarget.h
index ad7e611..46c268e 100644
--- a/Source/cmTarget.h
+++ b/Source/cmTarget.h
@@ -255,6 +255,19 @@ public:
if the target cannot be linked. */
LinkInterface const* GetLinkInterface(const char* config);
+ /** The link implementation specifies the direct library
+ dependencies needed by the object files of the target. */
+ struct LinkImplementation
+ {
+ // Libraries linked directly in this configuration.
+ std::vector<std::string> Libraries;
+
+ // Libraries linked directly in other configurations.
+ // Needed only for OLD behavior of CMP0003.
+ std::vector<std::string> WrongConfigLibraries;
+ };
+ LinkImplementation const* GetLinkImplementation(const char* config);
+
/** Strip off leading and trailing whitespace from an item named in
the link dependencies of this target. */
std::string CheckCMP0004(std::string const& item);
@@ -520,6 +533,9 @@ private:
bool ComputeLinkInterface(const char* config, LinkInterface& iface);
+ void ComputeLinkImplementation(const char* config,
+ LinkImplementation& impl);
+
// The cmMakefile instance that owns this target. This should
// always be set.
cmMakefile* Makefile;