mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-25 15:49:08 -05:00
23bbac941a
The new sub-command writes a string representation of the current log level to the output variable given to the sub-command. Given that the log-level might be set either via the --log-level command line option or via the CMAKE_MESSAGE_LOG_LEVEL cache / regular variables, the priority for each of the log level sources is as follows, with the first one being the highest: 1) --log-level 2) CMAKE_MESSAGE_LOG_LEVEL regular variable 3) CMAKE_MESSAGE_LOG_LEVEL cache variable 4) default log level (STATUS) Fixes: #23572
23 lines
916 B
ReStructuredText
23 lines
916 B
ReStructuredText
CMAKE_MESSAGE_LOG_LEVEL
|
|
-----------------------
|
|
|
|
.. versionadded:: 3.17
|
|
|
|
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.
|
|
|
|
.. versionadded:: 3.25
|
|
See the :command:`cmake_language`
|
|
:ref:`cmake_language <query_message_log_level>` command for a way to query
|
|
the current message logging level.
|