Display feature alias information in configure

Pick-to: 6.8
Change-Id: Ia7d054436ffcca64d6fecd363795e7439694b3f4
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 11fab3d1503634b47731d91ab0f7d6064dd49b42)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit de505a9c787fcc55b9269e03f369c51db3f8742b)
This commit is contained in:
Cristian Le 2025-06-03 15:55:49 +02:00
parent 7ce45eb4ac
commit a27a118227

View File

@ -231,8 +231,22 @@ function(qt_feature feature)
endfunction()
function(qt_feature_alias feature)
cmake_parse_arguments(arg "NEGATE" "PURPOSE;SECTION;MESSAGE;ALIAS_OF_FEATURE;ALIAS_OF_CACHE" ""
${ARGN})
set_property(GLOBAL APPEND PROPERTY COMMANDLINE_KNOWN_FEATURES "${feature}")
# TODO: Alias features are not listed, but neither are features without PURPOSE.
# Mark the feature as aliased
set(alias_note "alias of ")
if(arg_NEGATE)
string(APPEND alias_note "NOT ")
endif()
if(arg_ALIAS_OF_FEATURE)
string(APPEND alias_note "${arg_ALIAS_OF_FEATURE} Feature")
else()
string(APPEND alias_note "${arg_ALIAS_OF_CACHE} Cache")
endif()
set(arg_PURPOSE "(${alias_note}) ${arg_PURPOSE}")
set_property(GLOBAL PROPERTY COMMANDLINE_FEATURE_PURPOSE_${feature} "${arg_PURPOSE}")
set_property(GLOBAL PROPERTY COMMANDLINE_FEATURE_SECTION_${feature} "${arg_SECTION}")
endfunction()
function(find_package)