[Cmake-commits] CMake branch, next, updated. v2.8.11-2463-gd86646d

Stephen Kelly steveire at gmail.com
Mon Jun 3 18:03:41 EDT 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  d86646d5a50bc1e3ecb2d134412041737bebadd7 (commit)
       via  acf231736bd3eaeb9cce940a1066e782a8c8fd41 (commit)
      from  6f7ea8fd2663e96b768cdeb716eb523987075bf8 (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=d86646d5a50bc1e3ecb2d134412041737bebadd7
commit d86646d5a50bc1e3ecb2d134412041737bebadd7
Merge: 6f7ea8f acf2317
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Mon Jun 3 18:03:39 2013 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Jun 3 18:03:39 2013 -0400

    Merge topic 'fix-genex-HEAD-target' into next
    
    acf2317 Genex: Fix the HEAD target used for evaluated expressions.


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=acf231736bd3eaeb9cce940a1066e782a8c8fd41
commit acf231736bd3eaeb9cce940a1066e782a8c8fd41
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Mon Jun 3 23:53:29 2013 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Mon Jun 3 23:54:09 2013 +0200

    Genex: Fix the HEAD target used for evaluated expressions.
    
    If the expression $<TARGET_PROPERTY:prop> appears in the content
    of a target property, the target that prop is read from is
    the 'head target' of the expression. In contexts such as evaluating
    the content of a target property during generation, such
    as INCLUDE_DIRECTORIES, the 'head target' is the one on which the
    initial request was made.
    
    If evaluating a generator expression which is not a target property
    content, the target must be explicitly specified. Such contexts
    include add_custom_command and file(GENERATE). The content might
    then look like
    
     $<TARGET_PROPERTY:tgt,prop>
    
    However, as there is no HeadTarget set, any generator expressions
    evaluated as part of reading prop from tgt which do not specify
    the tgt directly report an error.
    
    Modify the logic of the TARGET_PROPERTY generator expression so
    that in such contexts, the 'head target' is set to the appropriate
    target which was first encountered.

diff --git a/Source/cmGeneratorExpressionEvaluator.cxx b/Source/cmGeneratorExpressionEvaluator.cxx
index 5e7d00d..3b41362 100644
--- a/Source/cmGeneratorExpressionEvaluator.cxx
+++ b/Source/cmGeneratorExpressionEvaluator.cxx
@@ -729,6 +729,8 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode
       interfacePropertyName = "INTERFACE_COMPILE_OPTIONS";
       }
 
+    cmTarget *headTarget = context->HeadTarget ? context->HeadTarget : target;
+
     const char **transBegin = targetPropertyTransitiveWhitelist;
     const char **transEnd = targetPropertyTransitiveWhitelist
               + (sizeof(targetPropertyTransitiveWhitelist) /
@@ -738,7 +740,7 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode
       {
       const cmTarget::LinkInterface *iface = target->GetLinkInterface(
                                                     context->Config,
-                                                    context->HeadTarget);
+                                                    headTarget);
       if(iface)
         {
         linkedTargetsContent =
@@ -752,7 +754,7 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode
       {
       const cmTarget::LinkImplementation *impl = target->GetLinkImplementation(
                                                     context->Config,
-                                                    context->HeadTarget);
+                                                    headTarget);
       if(impl)
         {
         linkedTargetsContent =
@@ -805,7 +807,7 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode
         std::string result = cge->Evaluate(context->Makefile,
                             context->Config,
                             context->Quiet,
-                            context->HeadTarget,
+                            headTarget,
                             target,
                             &dagChecker);
 

-----------------------------------------------------------------------

Summary of changes:
 Source/cmGeneratorExpressionEvaluator.cxx |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list