[Cmake-commits] CMake branch, next, updated. v2.8.10.2-1372-g1d63c31
Stephen Kelly
steveire at gmail.com
Thu Jan 3 15:03:38 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 1d63c31d9875a89c12eacf8e0cb77cb83aa66336 (commit)
via e767ffcda58ab73cf2c4394202eec7ae1f6035b5 (commit)
from 9a0054d7bd56e74614e1ff7c457c884ba4752dc0 (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=1d63c31d9875a89c12eacf8e0cb77cb83aa66336
commit 1d63c31d9875a89c12eacf8e0cb77cb83aa66336
Merge: 9a0054d e767ffc
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Thu Jan 3 15:03:36 2013 -0500
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Thu Jan 3 15:03:36 2013 -0500
Merge topic 'fix-genex-with-no-target' into next
e767ffc Don't crash when a target is expected but is not available.
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e767ffcda58ab73cf2c4394202eec7ae1f6035b5
commit e767ffcda58ab73cf2c4394202eec7ae1f6035b5
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Thu Jan 3 20:56:32 2013 +0100
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Thu Jan 3 20:56:32 2013 +0100
Don't crash when a target is expected but is not available.
diff --git a/Source/cmGeneratorExpressionEvaluator.cxx b/Source/cmGeneratorExpressionEvaluator.cxx
index 3b7cfc0..d86ae54 100644
--- a/Source/cmGeneratorExpressionEvaluator.cxx
+++ b/Source/cmGeneratorExpressionEvaluator.cxx
@@ -18,6 +18,8 @@
#include <cmsys/String.h>
+#include <assert.h>
+
//----------------------------------------------------------------------------
#if !defined(__SUNPRO_CC) || __SUNPRO_CC > 0x510
static
@@ -291,6 +293,17 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode
cmTarget* target = context->Target;
std::string propertyName = *parameters.begin();
+
+ if (!target && parameters.size() == 1)
+ {
+ reportError(context, content->GetOriginalExpression(),
+ "$<TARGET_PROPERTY:prop> may only be used with targets. It may not "
+ "be used with add_custom_command. Specify the target to read a "
+ "property from using the $<TARGET_PROPERTY:tgt,prop> signature "
+ "instead.");
+ return std::string();
+ }
+
if (parameters.size() == 2)
{
if (parameters.begin()->empty() && parameters[1].empty())
@@ -351,6 +364,8 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode
return std::string();
}
+ assert(target);
+
cmGeneratorExpressionDAGChecker dagChecker(context->Backtrace,
target->GetName(),
propertyName,
-----------------------------------------------------------------------
Summary of changes:
Source/cmGeneratorExpressionEvaluator.cxx | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list