summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/message/message-indent.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/RunCMake/message/message-indent.cmake')
-rw-r--r--Tests/RunCMake/message/message-indent.cmake19
1 files changed, 19 insertions, 0 deletions
diff --git a/Tests/RunCMake/message/message-indent.cmake b/Tests/RunCMake/message/message-indent.cmake
new file mode 100644
index 0000000..c07ff45
--- /dev/null
+++ b/Tests/RunCMake/message/message-indent.cmake
@@ -0,0 +1,19 @@
+function(debug_list LIST_VAR)
+ message(STATUS "${LIST_VAR}:")
+ list(APPEND CMAKE_MESSAGE_INDENT " ")
+ foreach(_item IN LISTS ${LIST_VAR})
+ list(LENGTH ${_item} _item_len)
+ if(_item_len GREATER 1)
+ debug_list(${_item})
+ else()
+ message(STATUS "${_item}")
+ endif()
+ endforeach()
+endfunction()
+
+list(APPEND COUNTING_ENGLISH one two three four five)
+list(APPEND COUNTING_BAHASA satu dua tiga empat lima)
+
+list(APPEND COUNTING COUNTING_ENGLISH COUNTING_BAHASA)
+
+debug_list(COUNTING)