From ef5e1e3a5b1cb02f853bdbb0dabde598778d8ea0 Mon Sep 17 00:00:00 2001 From: Tyler Yankee Date: Thu, 4 Jun 2026 09:03:55 -0400 Subject: [PATCH] Help: Fix references to cmake_language(GET_MESSAGE_LOG_LEVEL) While we're at it, use the new `:cmake-option:` role to shorten some references to `--log-level`. --- Help/command/cmake_language.rst | 7 ++----- Help/manual/cmake.1.rst | 4 ++-- Help/variable/CMAKE_MESSAGE_LOG_LEVEL.rst | 12 +++++------- 3 files changed, 9 insertions(+), 14 deletions(-) diff --git a/Help/command/cmake_language.rst b/Help/command/cmake_language.rst index e3a30fa117..c81aaac46e 100644 --- a/Help/command/cmake_language.rst +++ b/Help/command/cmake_language.rst @@ -495,8 +495,6 @@ Getting current message log level .. versionadded:: 3.25 -.. _query_message_log_level: - .. signature:: cmake_language(GET_MESSAGE_LOG_LEVEL ) @@ -506,9 +504,8 @@ Getting current message log level See :command:`message` for the possible logging levels. The current message logging level can be set either using the - :option:`--log-level ` - command line option of the :manual:`cmake(1)` program or using - the :variable:`CMAKE_MESSAGE_LOG_LEVEL` variable. + :cmake-option:`--log-level` command line option of the :manual:`cmake(1)` + program or using the :variable:`CMAKE_MESSAGE_LOG_LEVEL` variable. If both the command line option and the variable are set, the command line option takes precedence. If neither are set, the default logging level diff --git a/Help/manual/cmake.1.rst b/Help/manual/cmake.1.rst index 7b7680fba5..0a2d4512e6 100644 --- a/Help/manual/cmake.1.rst +++ b/Help/manual/cmake.1.rst @@ -426,8 +426,8 @@ Options synonym for this option. .. versionadded:: 3.25 - See the :command:`cmake_language` command for a way to - :ref:`query the current message logging level `. + See the :command:`cmake_language(GET_MESSAGE_LOG_LEVEL)` command for a way + to query the current message logging level. .. option:: --log-context diff --git a/Help/variable/CMAKE_MESSAGE_LOG_LEVEL.rst b/Help/variable/CMAKE_MESSAGE_LOG_LEVEL.rst index 4539c90ac1..8a3519c3d4 100644 --- a/Help/variable/CMAKE_MESSAGE_LOG_LEVEL.rst +++ b/Help/variable/CMAKE_MESSAGE_LOG_LEVEL.rst @@ -5,10 +5,9 @@ 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 -:option:`--log-level ` command line option of the -:manual:`cmake(1)` program. If this variable is set and the -:option:`--log-level ` command line option is -given, the command line option takes precedence. +:cmake-option:`--log-level` command line option of the :manual:`cmake(1)` +program. If this variable is set and the :cmake-option:`--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 @@ -18,6 +17,5 @@ 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 ` command for a way to query - the current message logging level. + See the :command:`cmake_language(GET_MESSAGE_LOG_LEVEL)` command for a way to + query the current message logging level.