Skip to content

cmake_language: Add GET_MESSAGE_LOG_LEVEL subcommand

alcroito requested to merge alcroito/cmake:log_level_command into master

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 (closed)

Edited by Brad King

Merge request reports