[Cmake-commits] CMake branch, next, updated. v2.8.11.2-4291-g05b38c7

Stephen Kelly steveire at gmail.com
Tue Sep 24 03:44:07 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  05b38c797a73482d4624541a67950f51497367c4 (commit)
       via  dae2b18b7eb0e73f0810b693b0346e4259325ec0 (commit)
      from  4b60ee4e5d484947cec8aeaeeb43a498de15ce2e (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=05b38c797a73482d4624541a67950f51497367c4
commit 05b38c797a73482d4624541a67950f51497367c4
Merge: 4b60ee4 dae2b18
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Tue Sep 24 03:44:05 2013 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Sep 24 03:44:05 2013 -0400

    Merge topic 'allow-alias-imported-targets' into next
    
    dae2b18 Allow ALIAS targets to alias IMPORTED targets.


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=dae2b18b7eb0e73f0810b693b0346e4259325ec0
commit dae2b18b7eb0e73f0810b693b0346e4259325ec0
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Tue Sep 24 09:38:59 2013 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Tue Sep 24 09:43:21 2013 +0200

    Allow ALIAS targets to alias IMPORTED targets.
    
    This allows source compatibility such as making Qt4::Core an alias
    of Qt5::Core during porting.
    
    A future patch will allow deprecation of targets, so using
    Qt4::Core in the above case would issue a message.

diff --git a/Source/cmAddLibraryCommand.cxx b/Source/cmAddLibraryCommand.cxx
index cbc6ed1..6fd70bf 100644
--- a/Source/cmAddLibraryCommand.cxx
+++ b/Source/cmAddLibraryCommand.cxx
@@ -159,14 +159,6 @@ 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 d00491f..573541a 100644
--- a/Tests/RunCMake/alias_targets/imported-target-result.txt
+++ b/Tests/RunCMake/alias_targets/imported-target-result.txt
@@ -1 +1 @@
-1
+0
diff --git a/Tests/RunCMake/alias_targets/imported-target-stderr.txt b/Tests/RunCMake/alias_targets/imported-target-stderr.txt
index bbff29a..10f3293 100644
--- a/Tests/RunCMake/alias_targets/imported-target-stderr.txt
+++ b/Tests/RunCMake/alias_targets/imported-target-stderr.txt
@@ -1,5 +1 @@
-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:


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list