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  323a0408bcc78f06b821f3eb3e44954d38e745ee (commit)
       via  f01dc72c582290390196f89593f32acf3e14b71f (commit)
      from  a3f2be517cda000cd608b99cebf7f1e2b82b58a5 (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=323a0408bcc78f06b821f3eb3e44954d38e745ee
commit 323a0408bcc78f06b821f3eb3e44954d38e745ee
Merge: a3f2be5 f01dc72
Author:     Stephen Kelly <steve...@gmail.com>
AuthorDate: Mon Sep 9 15:11:52 2013 -0400
Commit:     CMake Topic Stage <kwro...@kitware.com>
CommitDate: Mon Sep 9 15:11:52 2013 -0400

    Merge topic 'authorative-LINK_LIBRARIES' into next
    
    f01dc72 Use one authorative source of the LINK_LIBRARIES property.


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f01dc72c582290390196f89593f32acf3e14b71f
commit f01dc72c582290390196f89593f32acf3e14b71f
Author:     Stephen Kelly <steve...@gmail.com>
AuthorDate: Tue Aug 6 11:19:56 2013 +0200
Commit:     Stephen Kelly <steve...@gmail.com>
CommitDate: Mon Sep 9 21:08:34 2013 +0200

    Use one authorative source of the LINK_LIBRARIES property.
    
    We populate and maintain a vector of structs to keep track of
    backtraces already, so no need to populate the Properties container
    additionally.
    
    For completeness, it is necessary to remove the condition for
    populating the vector for only valid library names and generator
    expressions. That condition is now determined when evaluating the
    generator expressions.

diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 147c332..d18d2b8 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -2657,6 +2657,11 @@ void cmTarget::FinalizeSystemIncludeDirectories()
       end = this->Internal->LinkInterfacePropertyEntries.end();
       it != end; ++it)
     {
+    if (!cmGeneratorExpression::IsValidTargetName(it->Value)
+        && cmGeneratorExpression::Find(it->Value) == std::string::npos)
+      {
+      continue;
+      }
     {
     cmListFileBacktrace lfbt;
     cmGeneratorExpression ge(lfbt);
@@ -3033,15 +3038,11 @@ void cmTarget::SetProperty(const char* prop, const 
char* value)
   if (strcmp(prop, "LINK_LIBRARIES") == 0)
     {
     this->Internal->LinkInterfacePropertyEntries.clear();
-    if (cmGeneratorExpression::IsValidTargetName(value)
-        || cmGeneratorExpression::Find(value) != std::string::npos)
-      {
-      cmListFileBacktrace lfbt;
-      this->Makefile->GetBacktrace(lfbt);
-      cmValueWithOrigin entry(value, lfbt);
-      this->Internal->LinkInterfacePropertyEntries.push_back(entry);
-      }
-    // Fall through
+    cmListFileBacktrace lfbt;
+    this->Makefile->GetBacktrace(lfbt);
+    cmValueWithOrigin entry(value, lfbt);
+    this->Internal->LinkInterfacePropertyEntries.push_back(entry);
+    return;
     }
   this->Properties.SetProperty(prop, value, cmProperty::TARGET);
   this->MaybeInvalidatePropertyCache(prop);
@@ -3099,15 +3100,11 @@ void cmTarget::AppendProperty(const char* prop, const 
char* value,
     }
   if (strcmp(prop, "LINK_LIBRARIES") == 0)
     {
-    if (cmGeneratorExpression::IsValidTargetName(value)
-        || cmGeneratorExpression::Find(value) != std::string::npos)
-      {
-      cmListFileBacktrace lfbt;
-      this->Makefile->GetBacktrace(lfbt);
-      cmValueWithOrigin entry(value, lfbt);
-      this->Internal->LinkInterfacePropertyEntries.push_back(entry);
-      }
-    // Fall through
+    cmListFileBacktrace lfbt;
+    this->Makefile->GetBacktrace(lfbt);
+    cmValueWithOrigin entry(value, lfbt);
+    this->Internal->LinkInterfacePropertyEntries.push_back(entry);
+    return;
     }
   this->Properties.AppendProperty(prop, value, cmProperty::TARGET, asString);
   this->MaybeInvalidatePropertyCache(prop);
@@ -3387,6 +3384,11 @@ std::vector<std::string> 
cmTarget::GetIncludeDirectories(const char *config)
         end = this->Internal->LinkInterfacePropertyEntries.end();
         it != end; ++it)
       {
+      if (!cmGeneratorExpression::IsValidTargetName(it->Value)
+          && cmGeneratorExpression::Find(it->Value) == std::string::npos)
+        {
+        continue;
+        }
       {
       cmGeneratorExpression ge(lfbt);
       cmsys::auto_ptr<cmCompiledGeneratorExpression> cge =
@@ -3585,6 +3587,11 @@ void 
cmTarget::GetCompileOptions(std::vector<std::string> &result,
         end = this->Internal->LinkInterfacePropertyEntries.end();
         it != end; ++it)
       {
+      if (!cmGeneratorExpression::IsValidTargetName(it->Value)
+          && cmGeneratorExpression::Find(it->Value) == std::string::npos)
+        {
+        continue;
+        }
       {
       cmGeneratorExpression ge(lfbt);
       cmsys::auto_ptr<cmCompiledGeneratorExpression> cge =
@@ -3693,6 +3700,11 @@ void 
cmTarget::GetCompileDefinitions(std::vector<std::string> &list,
         end = this->Internal->LinkInterfacePropertyEntries.end();
         it != end; ++it)
       {
+      if (!cmGeneratorExpression::IsValidTargetName(it->Value)
+          && cmGeneratorExpression::Find(it->Value) == std::string::npos)
+        {
+        continue;
+        }
       {
       cmGeneratorExpression ge(lfbt);
       cmsys::auto_ptr<cmCompiledGeneratorExpression> cge =
@@ -4181,6 +4193,22 @@ const char *cmTarget::GetProperty(const char* prop,
       }
     return output.c_str();
     }
+  if(strcmp(prop,"LINK_LIBRARIES") == 0)
+    {
+    static std::string output;
+    output = "";
+    std::string sep;
+    for (std::vector<cmValueWithOrigin>::const_iterator
+        it = this->Internal->LinkInterfacePropertyEntries.begin(),
+        end = this->Internal->LinkInterfacePropertyEntries.end();
+        it != end; ++it)
+      {
+      output += sep;
+      output += it->Value;
+      sep = ";";
+      }
+    return output.c_str();
+    }
 
   if (strcmp(prop,"IMPORTED") == 0)
     {

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

Summary of changes:
 Source/cmTarget.cxx |   64 ++++++++++++++++++++++++++++++++++++--------------
 1 files changed, 46 insertions(+), 18 deletions(-)


hooks/post-receive
-- 
CMake
_______________________________________________
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-commits

Reply via email to