Merged 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:
- CMAKE_MESSAGE_LOG_LEVEL regular variable
- CMAKE_MESSAGE_LOG_LEVEL cache variable
- default log level (STATUS)
Fixes: #23572 (closed)