[Cmake-commits] CMake branch, next, updated. v2.8.10.2-1582-g6c9ad30
Stephen Kelly
steveire at gmail.com
Sun Jan 13 04:00:22 EST 2013
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via 6c9ad309dcaf57ba22db01f1fae1c0b4c998ae3d (commit)
via 1da75022bbe3239e028fe73d94dfae724ad25a7f (commit)
via 9822f8c931c39b28a587cf48b5314431386d50ea (commit)
from 5ce8375cb4ff8f729b9b9a99626dfe5e38fe2837 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6c9ad309dcaf57ba22db01f1fae1c0b4c998ae3d
commit 6c9ad309dcaf57ba22db01f1fae1c0b4c998ae3d
Merge: 5ce8375 1da7502
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Jan 13 04:00:21 2013 -0500
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Sun Jan 13 04:00:21 2013 -0500
Merge topic 'tll-allow-genex' into next
1da7502 Don't include generator expressions in old-style link handling.
9822f8c CMake Nightly Date Stamp
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1da75022bbe3239e028fe73d94dfae724ad25a7f
commit 1da75022bbe3239e028fe73d94dfae724ad25a7f
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Dec 23 19:00:18 2012 +0100
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Sun Jan 13 09:59:42 2013 +0100
Don't include generator expressions in old-style link handling.
Don't add generator expressions to variables which are used
for CMP0003, CMP0004, and the old-style _LIB_DEPENDS content. They
will not be evaluated when read anyway and would probably confuse
the code reading them.
This makes it legitimate to use target_link_libraries with generator
expressions as arguments.
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 9b50b8e..51512de 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -2233,6 +2233,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)
@@ -2254,6 +2262,11 @@ void cmTarget::AddLinkLibrary(cmMakefile& mf,
llt).c_str());
}
+ if (isGeneratorExpression(lib))
+ {
+ return;
+ }
+
cmTarget::LibraryID tmp;
tmp.first = lib;
tmp.second = llt;
diff --git a/Source/cmTargetLinkLibrariesCommand.h b/Source/cmTargetLinkLibrariesCommand.h
index 8e5823c..34fe54c 100644
--- a/Source/cmTargetLinkLibrariesCommand.h
+++ b/Source/cmTargetLinkLibrariesCommand.h
@@ -13,6 +13,7 @@
#define cmTargetLinkLibrariesCommand_h
#include "cmCommand.h"
+#include "cmDocumentGeneratorExpressions.h"
/** \class cmTargetLinkLibrariesCommand
* \brief Specify a list of libraries to link into executables.
@@ -141,6 +142,12 @@ public:
"However, if two archives are really so interdependent they should "
"probably be combined into a single archive."
")"
+ "\n"
+ "Arguments to target_link_libraries may use \"generator expressions\" "
+ "with the syntax \"$<...>\". Note however, that generator expressions "
+ "will not be used in OLD handling of CMP0003 or CMP0004."
+ "\n"
+ CM_DOCUMENT_COMMAND_GENERATOR_EXPRESSIONS
;
}
-----------------------------------------------------------------------
Summary of changes:
Source/CMakeVersion.cmake | 2 +-
Source/cmTarget.cxx | 13 +++++++++++++
Source/cmTargetLinkLibrariesCommand.h | 7 +++++++
3 files changed, 21 insertions(+), 1 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list