CMake: Store config summary to file

Add generation of qmake-like config.summary in build folder

Fixes: QTBUG-87830
Pick-to: 6.0
Change-Id: I08dd9b3116c6200f7e9f5de96605118c1ea474ad
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This commit is contained in:
Alexey Edelev 2020-12-29 11:50:44 +01:00
parent a0aafefd00
commit 6baf36d774

View File

@ -48,18 +48,23 @@ function(qt_configure_print_summary)
# Evaluate all recorded commands.
qt_configure_eval_commands()
set(summary_file "${CMAKE_BINARY_DIR}/config.summary")
# Show Qt-specific configure summary and any notes, wranings, etc.
if(__qt_configure_reports)
message("Configure summary:\n${__qt_configure_reports}")
file(WRITE "${summary_file}" "${__qt_configure_reports}")
endif()
if(__qt_configure_notes)
message("${__qt_configure_notes}")
file(APPEND "${summary_file}" "${__qt_configure_notes}")
endif()
if(__qt_configure_warnings)
message("${__qt_configure_warnings}")
file(APPEND "${summary_file}" "${__qt_configure_warnings}")
endif()
if(__qt_configure_errors)
message("${__qt_configure_errors}")
file(APPEND "${summary_file}" "${__qt_configure_errors}")
endif()
message("")
if(__qt_configure_an_error_occurred)