summaryrefslogtreecommitdiffstats
path: root/Tests/AliasTarget
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/AliasTarget')
-rw-r--r--Tests/AliasTarget/CMakeLists.txt22
1 files changed, 22 insertions, 0 deletions
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()