summaryrefslogtreecommitdiffstats
path: root/Help
diff options
context:
space:
mode:
Diffstat (limited to 'Help')
-rw-r--r--Help/command/message.rst3
-rw-r--r--Help/manual/cmake-variables.7.rst1
-rw-r--r--Help/manual/cmake.1.rst5
-rw-r--r--Help/release/dev/feature-CMAKE_MESSAGE_CONTEXT6
-rw-r--r--Help/variable/CMAKE_MESSAGE_LOG_LEVEL.rst15
5 files changed, 30 insertions, 0 deletions
diff --git a/Help/command/message.rst b/Help/command/message.rst
index c614286..1acf30a 100644
--- a/Help/command/message.rst
+++ b/Help/command/message.rst
@@ -59,6 +59,9 @@ The :manual:`curses interface <ccmake(1)>` shows ``STATUS`` to ``TRACE``
messages one at a time on a status line and other messages in an
interactive pop-up box. The ``--log-level`` command-line option to each of
these tools can be used to control which messages will be shown.
+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
by the content of the :variable:`CMAKE_MESSAGE_INDENT` variable (converted to
diff --git a/Help/manual/cmake-variables.7.rst b/Help/manual/cmake-variables.7.rst
index 9b24b5a..782a0f0 100644
--- a/Help/manual/cmake-variables.7.rst
+++ b/Help/manual/cmake-variables.7.rst
@@ -205,6 +205,7 @@ Variables that Change Behavior
/variable/CMAKE_MFC_FLAG
/variable/CMAKE_MAXIMUM_RECURSION_DEPTH
/variable/CMAKE_MESSAGE_INDENT
+ /variable/CMAKE_MESSAGE_LOG_LEVEL
/variable/CMAKE_MODULE_PATH
/variable/CMAKE_POLICY_DEFAULT_CMPNNNN
/variable/CMAKE_POLICY_WARNING_CMPNNNN
diff --git a/Help/manual/cmake.1.rst b/Help/manual/cmake.1.rst
index 4ab55a0..08b7534 100644
--- a/Help/manual/cmake.1.rst
+++ b/Help/manual/cmake.1.rst
@@ -206,6 +206,11 @@ Options
The :command:`message` command will only output messages of the specified
log level or higher. The default log level is ``STATUS``.
+ To make a log level persist between CMake runs, set
+ :variable:`CMAKE_MESSAGE_LOG_LEVEL` as a cache variable instead.
+ If both the command line option and the variable are given, the command line
+ option takes precedence.
+
For backward compatibility reasons, ``--loglevel`` is also accepted as a
synonym for this option.
diff --git a/Help/release/dev/feature-CMAKE_MESSAGE_CONTEXT b/Help/release/dev/feature-CMAKE_MESSAGE_CONTEXT
new file mode 100644
index 0000000..eb24e20
--- /dev/null
+++ b/Help/release/dev/feature-CMAKE_MESSAGE_CONTEXT
@@ -0,0 +1,6 @@
+feature-CMAKE_MESSAGE_CONTEXT
+-----------------------------
+
+* The :variable:`CMAKE_MESSAGE_LOG_LEVEL` variable can now be used
+ to persist a log level between CMake runs, unlike the ``--log-level``
+ command line option which only applies to that particular run.
diff --git a/Help/variable/CMAKE_MESSAGE_LOG_LEVEL.rst b/Help/variable/CMAKE_MESSAGE_LOG_LEVEL.rst
new file mode 100644
index 0000000..1d4cfe6
--- /dev/null
+++ b/Help/variable/CMAKE_MESSAGE_LOG_LEVEL.rst
@@ -0,0 +1,15 @@
+CMAKE_MESSAGE_LOG_LEVEL
+-----------------------
+
+When set, this variable specifies the logging level used by the
+:command:`message` command. Valid values are the same as those for the
+``--log-level`` command line option of the :manual:`cmake(1)` program.
+If this variable is set and the ``--log-level`` command line option is
+given, the command line option takes precedence.
+
+The main advantage to using this variable is to make a log level persist
+between CMake runs. Setting it as a cache variable will ensure that
+subsequent CMake runs will continue to use the chosen log level.
+
+Projects should not set this variable, it is intended for users so that
+they may control the log level according to their own needs.