summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorAlexey Edelev <alexey.edelev@qt.io>2020-12-30 13:55:18 +0100
committerAlexey Edelev <alexey.edelev@qt.io>2021-01-05 08:03:12 +0000
commit6d41d0f2b7d7e45fd60fc9868c742b347cd11be5 (patch)
tree1768cab066ae8cfc26d01c844b42f42a08911de6 /cmake
parentf31997448838902eb5237b567f0c80f423f2406e (diff)
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>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/QtBuildInformation.cmake5
-rw-r--r--cmake/QtFeature.cmake4
2 files changed, 7 insertions, 2 deletions
diff --git a/cmake/QtBuildInformation.cmake b/cmake/QtBuildInformation.cmake
index 3fc5417909..7ad83db036 100644
--- a/cmake/QtBuildInformation.cmake
+++ b/cmake/QtBuildInformation.cmake
@@ -362,6 +362,11 @@ function(qt_configure_add_report_entry)
qt_configure_record_command(ADD_REPORT_ENTRY ${ARGV})
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)
qt_parse_all_arguments(arg "qt_configure_add_report_entry"
""
diff --git a/cmake/QtFeature.cmake b/cmake/QtFeature.cmake
index 72b4001d57..58b46c4660 100644
--- a/cmake/QtFeature.cmake
+++ b/cmake/QtFeature.cmake
@@ -274,8 +274,8 @@ macro(qt_feature_set_value feature cache condition label conditionExpression)
if (NOT (condition) AND (cache))
_qt_internal_dump_expression_values(conditionDump "${conditionExpression}")
string(JOIN " " conditionString ${conditionExpression})
- message(SEND_ERROR "Feature \"${feature}\": Forcing to \"${cache}\" breaks its condition:\
-\n ${conditionString}\nCondition values dump:\n ${conditionDump}\n")
+ qt_configure_add_report_error("Feature \"${feature}\": Forcing to \"${cache}\" breaks its \
+condition:\n ${conditionString}\nCondition values dump:\n ${conditionDump}\n")
endif()
if (DEFINED "QT_FEATURE_${feature}")