[Cmake-commits] CMake branch, next, updated. v2.8.11.2-4293-ge54f9df

Stephen Kelly steveire at gmail.com
Tue Sep 24 05:07:16 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  e54f9dfbb6ca5485209f87e776b13977f83cc246 (commit)
       via  b15bd9435aaa13d971eee628080995ed3adea321 (commit)
      from  05b38c797a73482d4624541a67950f51497367c4 (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=e54f9dfbb6ca5485209f87e776b13977f83cc246
commit e54f9dfbb6ca5485209f87e776b13977f83cc246
Merge: 05b38c7 b15bd94
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Tue Sep 24 05:07:13 2013 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Sep 24 05:07:13 2013 -0400

    Merge topic 'allow-alias-imported-targets' into next
    
    b15bd94 Revert "Allow ALIAS targets to alias IMPORTED targets."


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b15bd9435aaa13d971eee628080995ed3adea321
commit b15bd9435aaa13d971eee628080995ed3adea321
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Tue Sep 24 11:06:39 2013 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Tue Sep 24 11:06:39 2013 +0200

    Revert "Allow ALIAS targets to alias IMPORTED targets."
    
    This reverts commit dae2b18b7eb0e73f0810b693b0346e4259325ec0.

diff --git a/Source/cmAddLibraryCommand.cxx b/Source/cmAddLibraryCommand.cxx
index 6fd70bf..cbc6ed1 100644
--- a/Source/cmAddLibraryCommand.cxx
+++ b/Source/cmAddLibraryCommand.cxx
@@ -159,6 +159,14 @@ bool cmAddLibraryCommand
       this->SetError(e.str().c_str());
       return false;
       }
+    if(aliasedTarget->IsImported())
+      {
+      cmOStringStream e;
+      e << "cannot create ALIAS target \"" << libName
+        << "\" because target \"" << aliasedName << "\" is IMPORTED.";
+      this->SetError(e.str().c_str());
+      return false;
+      }
     this->Makefile->AddAlias(libName.c_str(), aliasedTarget);
     return true;
     }
diff --git a/Tests/RunCMake/alias_targets/imported-target-result.txt b/Tests/RunCMake/alias_targets/imported-target-result.txt
index 573541a..d00491f 100644
--- a/Tests/RunCMake/alias_targets/imported-target-result.txt
+++ b/Tests/RunCMake/alias_targets/imported-target-result.txt
@@ -1 +1 @@
-0
+1
diff --git a/Tests/RunCMake/alias_targets/imported-target-stderr.txt b/Tests/RunCMake/alias_targets/imported-target-stderr.txt
index 10f3293..bbff29a 100644
--- a/Tests/RunCMake/alias_targets/imported-target-stderr.txt
+++ b/Tests/RunCMake/alias_targets/imported-target-stderr.txt
@@ -1 +1,5 @@
-^$
+CMake Error at imported-target.cmake:6 \(add_library\):
+  add_library cannot create ALIAS target "alias" because target "foo" is
+  IMPORTED.
+Call Stack \(most recent call first\):
+  CMakeLists.txt:3 \(include\)

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

Summary of changes:
 Source/cmAddLibraryCommand.cxx                     |    8 ++++++++
 .../alias_targets/imported-target-result.txt       |    2 +-
 .../alias_targets/imported-target-stderr.txt       |    6 +++++-
 3 files changed, 14 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list