diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2022-06-09 18:52:56 +0200 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2022-06-10 21:10:34 +0200 |
commit | b3d0325a8dca56d3163451a417edfe6015a4ffe0 (patch) | |
tree | a38f02952a13e0381793ccd4769b31c2ef6ef0de /cmake/QtSetup.cmake | |
parent | dd5c860a7b5f5bf347b698b9145c45d369325e42 (diff) |
CMake: Ensure top-level builds are affected by our chosen log level
This will hide the configuration summary and cmake feature summary and
found packages output upon reconfiguration.
Pick-to: 6.2 6.3 6.4
Task-number: QTBUG-104128
Change-Id: I42270b99e45076052ec176df4652661cae10ac0c
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Diffstat (limited to 'cmake/QtSetup.cmake')
-rw-r--r-- | cmake/QtSetup.cmake | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/cmake/QtSetup.cmake b/cmake/QtSetup.cmake index a0674df0a9..60b0bd0209 100644 --- a/cmake/QtSetup.cmake +++ b/cmake/QtSetup.cmake @@ -23,18 +23,22 @@ if(FEATURE_developer_build) set(_default_build_type "Debug") endif() -# Decide whether output should be verbose or not. -# Default to verbose (--log-level=STATUS) in a developer-build and -# non-verbose (--log-level=NOTICE) otherwise. -# If a custom CMAKE_MESSAGE_LOG_LEVEL was specified, it takes priority. -# Passing an explicit --log-level=Foo has the highest priority. -if(NOT CMAKE_MESSAGE_LOG_LEVEL) - if(FEATURE_developer_build OR QT_FEATURE_developer_build) - set(CMAKE_MESSAGE_LOG_LEVEL "STATUS") - else() - set(CMAKE_MESSAGE_LOG_LEVEL "NOTICE") +function(qt_internal_set_message_log_level out_var) + # Decide whether output should be verbose or not. + # Default to verbose (--log-level=STATUS) in a developer-build and + # non-verbose (--log-level=NOTICE) otherwise. + # If a custom CMAKE_MESSAGE_LOG_LEVEL was specified, it takes priority. + # Passing an explicit --log-level=Foo has the highest priority. + if(NOT CMAKE_MESSAGE_LOG_LEVEL) + if(FEATURE_developer_build OR QT_FEATURE_developer_build) + set(CMAKE_MESSAGE_LOG_LEVEL "STATUS") + else() + set(CMAKE_MESSAGE_LOG_LEVEL "NOTICE") + endif() + set(${out_var} "${CMAKE_MESSAGE_LOG_LEVEL}" PARENT_SCOPE) endif() -endif() +endfunction() +qt_internal_set_message_log_level(CMAKE_MESSAGE_LOG_LEVEL) # Reset content of extra build internal vars for each inclusion of QtSetup. unset(QT_EXTRA_BUILD_INTERNALS_VARS) |