summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/get_property/target_properties.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/RunCMake/get_property/target_properties.cmake')
-rw-r--r--Tests/RunCMake/get_property/target_properties.cmake16
1 files changed, 16 insertions, 0 deletions
diff --git a/Tests/RunCMake/get_property/target_properties.cmake b/Tests/RunCMake/get_property/target_properties.cmake
new file mode 100644
index 0000000..c5a141d
--- /dev/null
+++ b/Tests/RunCMake/get_property/target_properties.cmake
@@ -0,0 +1,16 @@
+function (check_target_property target prop)
+ get_target_property(gtp_val "${target}" "${prop}")
+ get_property(gp_val
+ TARGET "${target}"
+ PROPERTY "${prop}")
+
+ message("get_target_property: -->${gtp_val}<--")
+ message("get_property: -->${gp_val}<--")
+endfunction ()
+
+add_custom_target(tgt)
+set_target_properties(tgt PROPERTIES empty "" custom value)
+
+check_target_property(tgt empty)
+check_target_property(tgt custom)
+check_target_property(tgt noexist)