mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-07 22:59:56 -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
6 lines
171 B
CMake
6 lines
171 B
CMake
if(NEW_LOG_LEVEL)
|
|
set(CMAKE_MESSAGE_LOG_LEVEL "${NEW_LOG_LEVEL}")
|
|
endif()
|
|
cmake_language(GET_MESSAGE_LOG_LEVEL log_level)
|
|
message(STATUS "log level is: ${log_level}")
|