[Cmake-commits] CMake branch, next, updated. v2.8.12-4168-g2fa8b00

Stephen Kelly steveire at gmail.com
Sat Oct 19 02:47:58 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  2fa8b0049f961ea721c3d15aaa49c52629cdd981 (commit)
       via  a0f5118dd3e5e6325d1e7772a4d860bb30d1f98a (commit)
       via  d4eea510c6619f18261c79a7d1996b88d34ee2d7 (commit)
      from  117ba09f1076ea0a1c48e4cbbb46c4960b3367b6 (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=2fa8b0049f961ea721c3d15aaa49c52629cdd981
commit 2fa8b0049f961ea721c3d15aaa49c52629cdd981
Merge: 117ba09 a0f5118
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Oct 19 02:47:55 2013 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Sat Oct 19 02:47:55 2013 -0400

    Merge topic 'double-colon-is-imported' into next
    
    a0f5118 s/semicolon/colon/g
    d4eea51 Move the double colon test to cmTarget::GetLinkImplementation.


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a0f5118dd3e5e6325d1e7772a4d860bb30d1f98a
commit a0f5118dd3e5e6325d1e7772a4d860bb30d1f98a
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Oct 19 08:44:02 2013 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sat Oct 19 08:44:02 2013 +0200

    s/semicolon/colon/g

diff --git a/Help/policy/CMP0028.rst b/Help/policy/CMP0028.rst
index 33a90d6..ec318a0 100644
--- a/Help/policy/CMP0028.rst
+++ b/Help/policy/CMP0028.rst
@@ -1,12 +1,12 @@
 CMP0028
 -------
 
-Double semicolon in target name means ALIAS or IMPORTED target.
+Double colon in target name means ALIAS or IMPORTED target.
 
 CMake 2.8.12 and lower allowed the use of targets and files with double
-semi-colons in target_link_libraries, with some buildsystem generators.
+colons in target_link_libraries, with some buildsystem generators.
 
-The use of double-semicolons is a common pattern used to namespace IMPORTED
+The use of double-colons is a common pattern used to namespace IMPORTED
 targets and ALIAS targets.  When computing the link dependencies of a target,
 the name of each dependency could either be a target, or a file on disk.
 Previously, if a target was not found with a matching name, the name was
@@ -14,9 +14,9 @@ considered to refer to a file on disk.  This can lead to confusing error
 messages if there is a typo in what should be a target name.
 
 The OLD behavior for this policy is to search for targets, then files on disk,
-even if the search term contains double-semicolons.  The NEW behavior for this
+even if the search term contains double-colons.  The NEW behavior for this
 policy is to issue a FATAL_ERROR if a link dependency contains
-double-semicolons but is not an IMPORTED target or an ALIAS target.
+double-colons but is not an IMPORTED target or an ALIAS target.
 
 This policy was introduced in CMake version 3.0.0.  CMake version
 |release| warns when the policy is not set and uses OLD behavior.  Use
diff --git a/Source/cmPolicies.cxx b/Source/cmPolicies.cxx
index 07a5c5e..f7efc1e 100644
--- a/Source/cmPolicies.cxx
+++ b/Source/cmPolicies.cxx
@@ -244,7 +244,7 @@ cmPolicies::cmPolicies()
 
   this->DefinePolicy(
     CMP0028, "CMP0028",
-    "Double semicolon in target name means ALIAS or IMPORTED target.",
+    "Double colon in target name means ALIAS or IMPORTED target.",
     3,0,0,0, cmPolicies::WARN);
 }
 
diff --git a/Source/cmPolicies.h b/Source/cmPolicies.h
index 8837248..68cd7c2 100644
--- a/Source/cmPolicies.h
+++ b/Source/cmPolicies.h
@@ -79,8 +79,7 @@ public:
     CMP0026, ///< Disallow use of the LOCATION target property.
     CMP0027, ///< Conditionally linked imported targets with missing include
     /// directories.
-    CMP0028, ///< Double semicolon in target name means ALIAS or IMPORTED
-    /// target.
+    CMP0028, ///< Double colon in target name means ALIAS or IMPORTED target.
 
     /** \brief Always the last entry.
      *
diff --git a/Tests/RunCMake/CMP0028/CMP0028-WARN-stderr.txt b/Tests/RunCMake/CMP0028/CMP0028-WARN-stderr.txt
index 9729a4c..2ff6927 100644
--- a/Tests/RunCMake/CMP0028/CMP0028-WARN-stderr.txt
+++ b/Tests/RunCMake/CMP0028/CMP0028-WARN-stderr.txt
@@ -1,5 +1,5 @@
 CMake Warning \(dev\) at CMP0028-WARN.cmake:2 \(add_library\):
-  Policy CMP0028 is not set: Double semicolon in target name means ALIAS or
+  Policy CMP0028 is not set: Double colon in target name means ALIAS or
   IMPORTED target.  Run "cmake --help-policy CMP0028" for policy details.
   Use the cmake_policy command to set the policy and suppress this warning.
 

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d4eea510c6619f18261c79a7d1996b88d34ee2d7
commit d4eea510c6619f18261c79a7d1996b88d34ee2d7
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Oct 19 08:43:58 2013 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sat Oct 19 08:43:58 2013 +0200

    Move the double colon test to cmTarget::GetLinkImplementation.

diff --git a/Source/cmComputeLinkDepends.cxx b/Source/cmComputeLinkDepends.cxx
index 0ee6300..a2f3f7d 100644
--- a/Source/cmComputeLinkDepends.cxx
+++ b/Source/cmComputeLinkDepends.cxx
@@ -632,44 +632,6 @@ cmTarget* cmComputeLinkDepends::FindTargetToLink(int depender_index,
     }
   cmTarget* tgt = mf->FindTargetToUse(name);
 
-  if(!tgt && std::string(name).find("::") != std::string::npos)
-    {
-    bool noMessage = false;
-    cmake::MessageType messageType = cmake::FATAL_ERROR;
-    cmOStringStream e;
-    switch(this->Makefile->GetPolicyStatus(cmPolicies::CMP0028))
-      {
-      case cmPolicies::WARN:
-        {
-        e << (mf->GetPolicies()
-              ->GetPolicyWarning(cmPolicies::CMP0028)) << "\n";
-        messageType = cmake::AUTHOR_WARNING;
-        }
-        break;
-      case cmPolicies::OLD:
-        noMessage = true;
-      case cmPolicies::REQUIRED_IF_USED:
-      case cmPolicies::REQUIRED_ALWAYS:
-      case cmPolicies::NEW:
-        // Issue the fatal message.
-        break;
-      }
-
-    if(!noMessage)
-      {
-      e << "Target \"" << this->Target->GetName() << "\" links to target \""
-        << name << "\" but the target was not found.  Perhaps a "
-        "find_package() call is missing for an IMPORTED target, or a ALIAS "
-        "target is missing?";
-      this->CMakeInstance->IssueMessage(messageType, e.str(),
-                                        this->Target->GetBacktrace());
-      if (messageType == cmake::FATAL_ERROR)
-        {
-        return 0;
-        }
-      }
-    }
-
   // Skip targets that will not really be linked.  This is probably a
   // name conflict between an external library and an executable
   // within the project.
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index b6182ab..647eb76 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -5483,6 +5483,46 @@ void cmTarget::ComputeLinkImplementation(const char* config,
       {
       continue;
       }
+    cmTarget *tgt = this->Makefile->FindTargetToUse(li->c_str());
+
+    if(!tgt && std::string(item).find("::") != std::string::npos)
+      {
+      bool noMessage = false;
+      cmake::MessageType messageType = cmake::FATAL_ERROR;
+      cmOStringStream e;
+      switch(this->Makefile->GetPolicyStatus(cmPolicies::CMP0028))
+        {
+        case cmPolicies::WARN:
+          {
+          e << (this->Makefile->GetPolicies()
+                ->GetPolicyWarning(cmPolicies::CMP0028)) << "\n";
+          messageType = cmake::AUTHOR_WARNING;
+          }
+          break;
+        case cmPolicies::OLD:
+          noMessage = true;
+        case cmPolicies::REQUIRED_IF_USED:
+        case cmPolicies::REQUIRED_ALWAYS:
+        case cmPolicies::NEW:
+          // Issue the fatal message.
+          break;
+        }
+
+      if(!noMessage)
+        {
+        e << "Target \"" << this->GetName() << "\" links to target \"" << item
+          << "\" but the target was not found.  Perhaps a find_package() "
+          "call is missing for an IMPORTED target, or a ALIAS target is "
+          "missing?";
+        this->Makefile->GetCMakeInstance()->IssueMessage(messageType,
+                                                      e.str(),
+                                                      this->GetBacktrace());
+        if (messageType == cmake::FATAL_ERROR)
+          {
+          return;
+          }
+        }
+      }
     // The entry is meant for this configuration.
     impl.Libraries.push_back(item);
     }

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

Summary of changes:
 Help/policy/CMP0028.rst                        |   10 +++---
 Source/cmComputeLinkDepends.cxx                |   38 ----------------------
 Source/cmPolicies.cxx                          |    2 +-
 Source/cmPolicies.h                            |    3 +-
 Source/cmTarget.cxx                            |   40 ++++++++++++++++++++++++
 Tests/RunCMake/CMP0028/CMP0028-WARN-stderr.txt |    2 +-
 6 files changed, 48 insertions(+), 47 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list