summaryrefslogtreecommitdiff
path: root/Source/cmTarget.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-01-15 14:34:29 -0500
committerCMake Topic Stage <kwrobot@kitware.com>2013-01-15 14:34:29 -0500
commit8d91e23565e01765d821716fcd3d64d7e45e6440 (patch)
tree481a4f972476a7e215e11281ec5c77057404387d /Source/cmTarget.cxx
parent0dce5bc2f263b717582fd622104a5c26db9b8bef (diff)
parent1da75022bbe3239e028fe73d94dfae724ad25a7f (diff)
downloadcmake-8d91e23565e01765d821716fcd3d64d7e45e6440.tar.gz
Merge topic 'tll-allow-genex'
1da7502 Don't include generator expressions in old-style link handling.
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r--Source/cmTarget.cxx13
1 files changed, 13 insertions, 0 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 6f3f638195..6f681407b7 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -2246,6 +2246,14 @@ static std::string targetNameGenex(const char *lib)
}
//----------------------------------------------------------------------------
+static bool isGeneratorExpression(const std::string &lib)
+{
+ const std::string::size_type openpos = lib.find("$<");
+ return (openpos != std::string::npos)
+ && (lib.find(">", openpos) != std::string::npos);
+}
+
+//----------------------------------------------------------------------------
void cmTarget::AddLinkLibrary(cmMakefile& mf,
const char *target, const char* lib,
LinkLibraryType llt)
@@ -2267,6 +2275,11 @@ void cmTarget::AddLinkLibrary(cmMakefile& mf,
llt).c_str());
}
+ if (isGeneratorExpression(lib))
+ {
+ return;
+ }
+
cmTarget::LibraryID tmp;
tmp.first = lib;
tmp.second = llt;