diff options
author | Alex Turbov <i.zaufi@gmail.com> | 2019-10-10 12:28:12 (GMT) |
---|---|---|
committer | Craig Scott <craig.scott@crascit.com> | 2019-10-12 06:01:15 (GMT) |
commit | 5bf85e25178f5d9f19d2f30cf66f088c21e1114a (patch) | |
tree | dd22cbdaa84ef3faa5da98ced25adfed3219a507 /Help | |
parent | aa59badd6f1ab3c40d3674c26e1e55271d25225c (diff) | |
download | CMake-5bf85e25178f5d9f19d2f30cf66f088c21e1114a.zip CMake-5bf85e25178f5d9f19d2f30cf66f088c21e1114a.tar.gz CMake-5bf85e25178f5d9f19d2f30cf66f088c21e1114a.tar.bz2 |
message: Add new CMAKE_MESSAGE_LOG_LEVEL variable
Diffstat (limited to 'Help')
-rw-r--r-- | Help/command/message.rst | 3 | ||||
-rw-r--r-- | Help/manual/cmake-variables.7.rst | 1 | ||||
-rw-r--r-- | Help/manual/cmake.1.rst | 5 | ||||
-rw-r--r-- | Help/release/dev/feature-CMAKE_MESSAGE_CONTEXT | 6 | ||||
-rw-r--r-- | Help/variable/CMAKE_MESSAGE_LOG_LEVEL.rst | 15 |
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. |