summaryrefslogtreecommitdiff
path: root/Help/command/message.rst
diff options
context:
space:
mode:
authorAlex Turbov <i.zaufi@gmail.com>2019-10-12 13:37:15 +1100
committerCraig Scott <craig.scott@crascit.com>2019-10-12 18:21:36 +1100
commit7cf79f44195a86a907dba770f1f7a361d00e77c2 (patch)
treea8c9b970b55979ec5eecce59aadab91036941235 /Help/command/message.rst
parent5bf85e25178f5d9f19d2f30cf66f088c21e1114a (diff)
downloadcmake-7cf79f44195a86a907dba770f1f7a361d00e77c2.tar.gz
message: Support logging a context with each message
Diffstat (limited to 'Help/command/message.rst')
-rw-r--r--Help/command/message.rst13
1 files changed, 12 insertions, 1 deletions
diff --git a/Help/command/message.rst b/Help/command/message.rst
index 1acf30a00f..beb820ade4 100644
--- a/Help/command/message.rst
+++ b/Help/command/message.rst
@@ -63,11 +63,22 @@ To make a log level persist between CMake runs, the
:variable:`CMAKE_MESSAGE_LOG_LEVEL` variable can be set instead.
Note that the command line option takes precedence over the cache variable.
-Messages of log levels ``NOTICE`` and below will also have each line preceded
+Messages of log levels ``NOTICE`` and below will 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.
+Messages of log levels ``NOTICE`` and below can also have each line preceded
+with context of the form ``[some.context.example]``. The content between the
+square brackets is obtained by converting the :variable:`CMAKE_MESSAGE_CONTEXT`
+list variable to a dot-separated string. The message context will always
+appear before any indenting content but after any automatically added leading
+hyphens. By default, message context is not shown, it has to be explicitly
+enabled by giving the :manual:`cmake <cmake(1)>` ``--log-context``
+command-line option or by setting the :variable:`CMAKE_MESSAGE_CONTEXT_SHOW`
+variable to true. See the :variable:`CMAKE_MESSAGE_CONTEXT` documentation for
+usage examples.
+
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.