From db705d079472ecf58ca03a72126a179df52598ee Mon Sep 17 00:00:00 2001 From: Alexey Edelev Date: Tue, 4 Apr 2023 13:16:49 +0200 Subject: [PATCH] Fix multi-thread GNU make build Add the timestamp file creation for configure-time executables. GNU make treats the custom command artifacts as 'dirty' when one of the expected outputs is missing. It displays the following disclaimer Deleting primary custom command output ... because another output ... does not exist. which leads to the configure-time executable rebuild. The removal and rebuild is not in sync with the dependency lookup for other targets(thanks to GNU make) so targets that depend on the configure-time executables simply miss the dependency at build time. This happens to syncqt and '_sync_headers' targets. So creating the timestamp file at configure time indicates to GNU make that there is no need of removing the syncqt executable and the build process doesn't fail because of missing dependency. Fixes: QTBUG-112018 Fixes: QTBUG-111163 Pick-to: 6.5 Change-Id: I6c1e8cae522104cf50d0376fa2b5653a6770f9ca Reviewed-by: Alexandru Croitor Reviewed-by: Qt CI Bot --- cmake/QtExecutableHelpers.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/cmake/QtExecutableHelpers.cmake b/cmake/QtExecutableHelpers.cmake index 42a02785b8..8be1186464 100644 --- a/cmake/QtExecutableHelpers.cmake +++ b/cmake/QtExecutableHelpers.cmake @@ -470,6 +470,7 @@ function(qt_internal_add_configure_time_executable target) OUTPUT_VARIABLE try_compile_output ) + file(WRITE "${timestamp_file}" "") if(NOT result) message(FATAL_ERROR "Unable to build ${target}: ${try_compile_output}") endif()