[Cmake-commits] CMake branch, next, updated. v2.8.10.2-1640-g9081461
Stephen Kelly
steveire at gmail.com
Wed Jan 16 16:26:27 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 90814610c8f34734d0891fcb434e46e280ddc96b (commit)
via 24dcf0c0072d6e0ca5a1203a54b574d1db9e5a7d (commit)
from 9bbf4839ecf609456cddc48bb2e00c241f144a93 (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=90814610c8f34734d0891fcb434e46e280ddc96b
commit 90814610c8f34734d0891fcb434e46e280ddc96b
Merge: 9bbf483 24dcf0c
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Wed Jan 16 16:26:24 2013 -0500
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Wed Jan 16 16:26:24 2013 -0500
Merge topic 'fix-target_include_directories-genex' into next
24dcf0c Make sure generator expressions can be used with target_include_directories.
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=24dcf0c0072d6e0ca5a1203a54b574d1db9e5a7d
commit 24dcf0c0072d6e0ca5a1203a54b574d1db9e5a7d
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Wed Jan 16 22:16:46 2013 +0100
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Wed Jan 16 22:16:46 2013 +0100
Make sure generator expressions can be used with target_include_directories.
Handle the case that a generator expression is used before treating
a non-target as an error.
diff --git a/Source/cmTargetPropCommandBase.cxx b/Source/cmTargetPropCommandBase.cxx
index 69aaf17..7f15dcb 100644
--- a/Source/cmTargetPropCommandBase.cxx
+++ b/Source/cmTargetPropCommandBase.cxx
@@ -66,6 +66,14 @@ bool cmTargetPropCommandBase
}
//----------------------------------------------------------------------------
+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);
+}
+
+//----------------------------------------------------------------------------
bool cmTargetPropCommandBase
::ProcessContentArgs(std::vector<std::string> const& args,
unsigned int &argIndex, bool prepend)
@@ -105,6 +113,10 @@ bool cmTargetPropCommandBase
content += sep + "$<TARGET_PROPERTY:" + args[i]
+ ",INTERFACE_" + this->Property + ">";
}
+ else if(isGeneratorExpression(args[i]))
+ {
+ content += sep + args[i];
+ }
else if (!this->HandleNonTargetArg(content, sep, args[i], args[0]))
{
return false;
diff --git a/Tests/CMakeCommands/target_include_directories/CMakeLists.txt b/Tests/CMakeCommands/target_include_directories/CMakeLists.txt
index a0f2ee0..8fa2eae 100644
--- a/Tests/CMakeCommands/target_include_directories/CMakeLists.txt
+++ b/Tests/CMakeCommands/target_include_directories/CMakeLists.txt
@@ -33,7 +33,12 @@ target_include_directories(target_include_directories
PUBLIC "${CMAKE_CURRENT_BINARY_DIR}/poison"
)
target_include_directories(target_include_directories
- BEFORE PUBLIC "${CMAKE_CURRENT_BINARY_DIR}/cure"
+ BEFORE PUBLIC "$<$<TARGET_DEFINED:target_include_directories>:${CMAKE_CURRENT_BINARY_DIR}/cure>"
+)
+
+# Has no effect because the target is not defined:
+target_include_directories(target_include_directories
+ BEFORE PUBLIC "$<$<TARGET_DEFINED:notdefined>:${CMAKE_CURRENT_BINARY_DIR}/poison>"
)
add_library(importedlib UNKNOWN IMPORTED)
-----------------------------------------------------------------------
Summary of changes:
Source/cmTargetPropCommandBase.cxx | 12 ++++++++++++
.../target_include_directories/CMakeLists.txt | 7 ++++++-
2 files changed, 18 insertions(+), 1 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list