Display feature alias information in configure

Pick-to: 6.10 6.9 6.8
Change-Id: Ia7d054436ffcca64d6fecd363795e7439694b3f4
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
Cristian Le 2025-04-29 15:47:24 +02:00
parent eaf87cdfd8
commit 11fab3d150

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)