[Cmake-commits] CMake branch, next, updated. v2.8.12.1-6421-g1dd50a6

Stephen Kelly steveire at gmail.com
Thu Dec 26 06:58:54 EST 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  1dd50a66d06b4f041e0be0381b6a0ef47ac95ef2 (commit)
       via  8e66cbcf5438b55b065c6c38eb1021c3cc237bdc (commit)
      from  7600bbc266fd18a5c2083001592a3c8990f1da6c (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=1dd50a66d06b4f041e0be0381b6a0ef47ac95ef2
commit 1dd50a66d06b4f041e0be0381b6a0ef47ac95ef2
Merge: 7600bbc 8e66cbc
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Thu Dec 26 06:58:52 2013 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Thu Dec 26 06:58:52 2013 -0500

    Merge topic 'minor-cleanups' into next
    
    8e66cbc get_property: Fix testing ALIASED_TARGET target property (#14670)


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8e66cbcf5438b55b065c6c38eb1021c3cc237bdc
commit 8e66cbcf5438b55b065c6c38eb1021c3cc237bdc
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Thu Dec 26 12:45:44 2013 +0100
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Thu Dec 26 12:58:18 2013 +0100

    get_property: Fix testing ALIASED_TARGET target property (#14670)
    
    In the case where the argument is not an ALIAS, the variable should
    be set to a -NOTFOUND content.

diff --git a/Source/cmGetPropertyCommand.cxx b/Source/cmGetPropertyCommand.cxx
index faba7cd..a1454a3 100644
--- a/Source/cmGetPropertyCommand.cxx
+++ b/Source/cmGetPropertyCommand.cxx
@@ -298,7 +298,7 @@ bool cmGetPropertyCommand::HandleTargetMode()
         return this->StoreResult(target->GetName());
         }
       }
-    return false;
+    return this->StoreResult((this->Variable + "-NOTFOUND").c_str());
     }
   if(cmTarget* target = this->Makefile->FindTargetToUse(this->Name.c_str()))
     {
diff --git a/Tests/AliasTarget/CMakeLists.txt b/Tests/AliasTarget/CMakeLists.txt
index fdb1638..9467fae 100644
--- a/Tests/AliasTarget/CMakeLists.txt
+++ b/Tests/AliasTarget/CMakeLists.txt
@@ -48,3 +48,25 @@ endif()
 
 add_library(iface INTERFACE)
 add_library(Alias::Iface ALIAS iface)
+
+get_target_property(_notAlias1 foo ALIASED_TARGET)
+if (NOT DEFINED _notAlias1)
+  message(SEND_ERROR "_notAlias1 is not defined")
+endif()
+if (_notAlias1)
+  message(SEND_ERROR "_notAlias1 is defined, but foo is not an ALIAS")
+endif()
+if (NOT _notAlias1 STREQUAL _notAlias1-NOTFOUND)
+  message(SEND_ERROR "_notAlias1 not defined to a -NOTFOUND variant")
+endif()
+
+get_property(_notAlias2 TARGET foo PROPERTY ALIASED_TARGET)
+if (NOT DEFINED _notAlias2)
+  message(SEND_ERROR "_notAlias2 is not defined")
+endif()
+if (_notAlias2)
+  message(SEND_ERROR "_notAlias2 is defined, but foo is not an ALIAS")
+endif()
+if (NOT _notAlias2 STREQUAL _notAlias2-NOTFOUND)
+  message(SEND_ERROR "_notAlias2 not defined to a -NOTFOUND variant")
+endif()

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

Summary of changes:
 Source/cmGetPropertyCommand.cxx  |    2 +-
 Tests/AliasTarget/CMakeLists.txt |   22 ++++++++++++++++++++++
 2 files changed, 23 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list