• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1CMAKE_MESSAGE_INDENT
2--------------------
3
4.. versionadded:: 3.16
5
6The :command:`message` command joins the strings from this list and for
7log levels of ``NOTICE`` and below, it prepends the resultant string to
8each line of the message.
9
10Example:
11
12.. code-block:: cmake
13
14  list(APPEND listVar one two three)
15
16  message(VERBOSE [[Collected items in the "listVar":]])
17  list(APPEND CMAKE_MESSAGE_INDENT "  ")
18
19  foreach(item IN LISTS listVar)
20    message(VERBOSE ${item})
21  endforeach()
22
23  list(POP_BACK CMAKE_MESSAGE_INDENT)
24  message(VERBOSE "No more indent")
25
26Which results in the following output:
27
28.. code-block:: none
29
30  -- Collected items in the "listVar":
31  --   one
32  --   two
33  --   three
34  -- No more indent
35