summaryrefslogtreecommitdiffstats
path: root/Help
diff options
context:
space:
mode:
authorAlex Turbov <i.zaufi@gmail.com>2019-06-20 21:46:53 (GMT)
committerCraig Scott <craig.scott@crascit.com>2019-07-21 00:19:30 (GMT)
commit5f6fd917a3c27f151e0dd05d12a75ab189f546e0 (patch)
tree21d802982dc3d61c6ffe62ae0da7a29f7b995b77 /Help
parentc3d9d800157a8fe2c0478d7e054544b99694c240 (diff)
downloadCMake-5f6fd917a3c27f151e0dd05d12a75ab189f546e0.zip
CMake-5f6fd917a3c27f151e0dd05d12a75ab189f546e0.tar.gz
CMake-5f6fd917a3c27f151e0dd05d12a75ab189f546e0.tar.bz2
message(): Control indentation via CMAKE_MESSAGE_INDENT
Diffstat (limited to 'Help')
-rw-r--r--Help/command/message.rst5
-rw-r--r--Help/manual/cmake-variables.7.rst1
-rw-r--r--Help/release/dev/message-indent.rst5
-rw-r--r--Help/variable/CMAKE_MESSAGE_INDENT.rst30
4 files changed, 41 insertions, 0 deletions
diff --git a/Help/command/message.rst b/Help/command/message.rst
index 5dca6b4..3002842 100644
--- a/Help/command/message.rst
+++ b/Help/command/message.rst
@@ -60,6 +60,11 @@ messages one at a time on a status line and other messages in an
interactive pop-up box. The ``--loglevel`` command-line option to each of
these tools can be used to control which messages will be shown.
+Messages of log levels ``NOTICE`` and below will also have each line preceded
+by the content of the :variable:`CMAKE_MESSAGE_INDENT` variable (converted to
+a single string by concatenating its list items). For ``STATUS`` to ``TRACE``
+messages, this indenting content will be inserted after the hyphens.
+
CMake Warning and Error message text displays using a simple markup
language. Non-indented text is formatted in line-wrapped paragraphs
delimited by newlines. Indented text is considered pre-formatted.
diff --git a/Help/manual/cmake-variables.7.rst b/Help/manual/cmake-variables.7.rst
index e0ce6f7..a7079bc 100644
--- a/Help/manual/cmake-variables.7.rst
+++ b/Help/manual/cmake-variables.7.rst
@@ -69,6 +69,7 @@ Variables that Provide Information
/variable/CMAKE_MAKE_PROGRAM
/variable/CMAKE_MATCH_COUNT
/variable/CMAKE_MATCH_n
+ /variable/CMAKE_MESSAGE_INDENT
/variable/CMAKE_MINIMUM_REQUIRED_VERSION
/variable/CMAKE_MINOR_VERSION
/variable/CMAKE_NETRC
diff --git a/Help/release/dev/message-indent.rst b/Help/release/dev/message-indent.rst
new file mode 100644
index 0000000..b170708
--- /dev/null
+++ b/Help/release/dev/message-indent.rst
@@ -0,0 +1,5 @@
+message-indent
+--------------
+
+* The :command:`message` command learned indentation control with the new
+ :variable:`CMAKE_MESSAGE_INDENT` variable.
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