CMake: Print feature condition errors in configure report
Add output of feature condition error at the end of configuration summary. Introduce qt_configure_add_report_error that may be used to add error to end-point configure report without actual configure interruption. Fixes: QTBUG-88282 Change-Id: Idcf478da863ae6507438eb3370927d7d1f01e071 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
This commit is contained in:
parent
f319974488
commit
6d41d0f2b7
@ -362,6 +362,11 @@ function(qt_configure_add_report_entry)
|
|||||||
qt_configure_record_command(ADD_REPORT_ENTRY ${ARGV})
|
qt_configure_record_command(ADD_REPORT_ENTRY ${ARGV})
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
|
function(qt_configure_add_report_error error)
|
||||||
|
message(SEND_ERROR "${error}")
|
||||||
|
qt_configure_add_report_entry(TYPE ERROR MESSAGE "${error}" CONDITION TRUE)
|
||||||
|
endfunction()
|
||||||
|
|
||||||
function(qt_configure_process_add_report_entry)
|
function(qt_configure_process_add_report_entry)
|
||||||
qt_parse_all_arguments(arg "qt_configure_add_report_entry"
|
qt_parse_all_arguments(arg "qt_configure_add_report_entry"
|
||||||
""
|
""
|
||||||
|
@ -274,8 +274,8 @@ macro(qt_feature_set_value feature cache condition label conditionExpression)
|
|||||||
if (NOT (condition) AND (cache))
|
if (NOT (condition) AND (cache))
|
||||||
_qt_internal_dump_expression_values(conditionDump "${conditionExpression}")
|
_qt_internal_dump_expression_values(conditionDump "${conditionExpression}")
|
||||||
string(JOIN " " conditionString ${conditionExpression})
|
string(JOIN " " conditionString ${conditionExpression})
|
||||||
message(SEND_ERROR "Feature \"${feature}\": Forcing to \"${cache}\" breaks its condition:\
|
qt_configure_add_report_error("Feature \"${feature}\": Forcing to \"${cache}\" breaks its \
|
||||||
\n ${conditionString}\nCondition values dump:\n ${conditionDump}\n")
|
condition:\n ${conditionString}\nCondition values dump:\n ${conditionDump}\n")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (DEFINED "QT_FEATURE_${feature}")
|
if (DEFINED "QT_FEATURE_${feature}")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user