diff options
author | Alexey Edelev <alexey.edelev@qt.io> | 2023-04-04 13:16:49 +0200 |
---|---|---|
committer | Alexey Edelev <alexey.edelev@qt.io> | 2023-04-05 01:04:28 +0200 |
commit | db705d079472ecf58ca03a72126a179df52598ee (patch) | |
tree | d5105469444d224f88c9d91eec600da89147067f /cmake/QtExecutableHelpers.cmake | |
parent | 65d79fb5f33ef0d028e7e8170184977ee73ce73e (diff) |
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 <alexandru.croitor@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'cmake/QtExecutableHelpers.cmake')
-rw-r--r-- | cmake/QtExecutableHelpers.cmake | 1 |
1 files changed, 1 insertions, 0 deletions
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() |