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  e4b2afdb3f87ee54d3d1b16724ccbc1efbcb22c7 (commit)
       via  ea6475334aff57633ad7bb80c013c8953328a909 (commit)
      from  d5be5b5f444f165229cfd699eed28fe25bff4342 (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 -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e4b2afdb3f87ee54d3d1b16724ccbc1efbcb22c7
commit e4b2afdb3f87ee54d3d1b16724ccbc1efbcb22c7
Merge: d5be5b5 ea64753
Author:     Gregor Jasny <gja...@googlemail.com>
AuthorDate: Fri Jul 22 00:44:13 2016 -0400
Commit:     CMake Topic Stage <kwro...@kitware.com>
CommitDate: Fri Jul 22 00:44:13 2016 -0400

    Merge topic 'aliased-target-properties' into next
    
    ea647533 Do not report ALIASED_TARGET as always set (#15783)


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ea6475334aff57633ad7bb80c013c8953328a909
commit ea6475334aff57633ad7bb80c013c8953328a909
Author:     Gregor Jasny <gja...@googlemail.com>
AuthorDate: Sat Jun 25 22:51:51 2016 +0200
Commit:     Gregor Jasny <gja...@googlemail.com>
CommitDate: Sat Jul 16 11:09:18 2016 -0700

    Do not report ALIASED_TARGET as always set (#15783)
    
    The cmGetPropertyCommand::StoreResult expects NULL for unset
    properties. Make ALIASED_TARGET align with that expectation.
    
    Additional corrections to the unit tests are necessary because
    get_property removes variables for unset properties (in contrast
    to get_target_property which stores a -NOTFOUND value).

diff --git a/Source/cmGetPropertyCommand.cxx b/Source/cmGetPropertyCommand.cxx
index 854fdb8..2307e08 100644
--- a/Source/cmGetPropertyCommand.cxx
+++ b/Source/cmGetPropertyCommand.cxx
@@ -253,7 +253,7 @@ bool cmGetPropertyCommand::HandleTargetMode()
       if (this->Makefile->IsAlias(this->Name)) {
         return this->StoreResult(target->GetName().c_str());
       } else {
-        return this->StoreResult((this->Variable + "-NOTFOUND").c_str());
+        return this->StoreResult(NULL);
       }
     }
     return this->StoreResult(
diff --git a/Tests/AliasTarget/CMakeLists.txt b/Tests/AliasTarget/CMakeLists.txt
index 47ccbdc..552c83c 100644
--- a/Tests/AliasTarget/CMakeLists.txt
+++ b/Tests/AliasTarget/CMakeLists.txt
@@ -66,6 +66,11 @@ endif()
 add_library(iface INTERFACE)
 add_library(Alias::Iface ALIAS iface)
 
+get_property(_aliased_target_set TARGET foo PROPERTY ALIASED_TARGET SET)
+if(_aliased_target_set)
+  message(SEND_ERROR "ALIASED_TARGET is set for target foo")
+endif()
+
 get_target_property(_notAlias1 foo ALIASED_TARGET)
 if (NOT DEFINED _notAlias1)
   message(SEND_ERROR "_notAlias1 is not defined")
@@ -78,12 +83,6 @@ if (NOT _notAlias1 STREQUAL _notAlias1-NOTFOUND)
 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")
+  message(SEND_ERROR "_notAlias2 evaluates to true, but foo is not an ALIAS")
 endif()

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

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


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

Reply via email to