diff options
author | Craig Scott <craig.scott@crascit.com> | 2019-07-22 11:02:24 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2019-07-22 11:02:50 (GMT) |
commit | f4131e4e1b5ac9ea8940a04b81e7b2ef2fba5d3f (patch) | |
tree | 9153897bf8d83cbce908162fe8d1eeb4cbfa218b /Help/variable | |
parent | f3bbbb42f17c24737acf54d7626901f185ce6b6b (diff) | |
parent | 5f6fd917a3c27f151e0dd05d12a75ab189f546e0 (diff) | |
download | CMake-f4131e4e1b5ac9ea8940a04b81e7b2ef2fba5d3f.zip CMake-f4131e4e1b5ac9ea8940a04b81e7b2ef2fba5d3f.tar.gz CMake-f4131e4e1b5ac9ea8940a04b81e7b2ef2fba5d3f.tar.bz2 |
Merge topic 'feature/message-indent'
5f6fd917a3 message(): Control indentation via CMAKE_MESSAGE_INDENT
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3464
Diffstat (limited to 'Help/variable')
-rw-r--r-- | Help/variable/CMAKE_MESSAGE_INDENT.rst | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/Help/variable/CMAKE_MESSAGE_INDENT.rst b/Help/variable/CMAKE_MESSAGE_INDENT.rst new file mode 100644 index 0000000..f7975ab --- /dev/null +++ b/Help/variable/CMAKE_MESSAGE_INDENT.rst @@ -0,0 +1,30 @@ +CMAKE_MESSAGE_INDENT +-------------------- + +The :command:`message` command joins the strings from this list and for +log levels of ``NOTICE`` and below, it prepends the resultant string to +each line of the message. + +Example: + +.. code-block:: cmake + + list(APPEND listVar one two three) + + message(VERBOSE [[Collected items in the "listVar":]]) + list(APPEND CMAKE_MESSAGE_INDENT " ") + + foreach(item IN LISTS listVar) + message(VERBOSE ${item}) + endforeach() + + list(POP_BACK CMAKE_MESSAGE_INDENT) + message(VERBOSE "No more indent") + +Which results in the following output: + + -- Collected items in the "listVar": + -- one + -- two + -- tree + -- No more indent |