aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2022-01-21 09:53:15 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-02-01 15:57:50 +0000
commit5eaa806e552c3db7ce32b207d584bb9c6fcaea71 (patch)
tree4b86d7db068699cd200871f745e0a2732f1c865b
parente13d3e9a4f9dfa0ecc4de8e4d0c81c82ecb6826d (diff)
Fall back to a cmake generated compile hash when git failed
Even if we have git, the source tree might not be a git repository, or git might fail for various reasons. So always fall back to the cmake- generated QML compile hash when it's empty after trying the .tag file and git. Amends a1bba5cd3d5f8a88cd79e6f56149ab88d1abe8b8. Change-Id: Ie9f5642bbfc0cead40138d1f92fe3d673f6dc372 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit 839dc73831eb8c4a65702c66b8c42015644cc4a5) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--cmake/QtDeclarativeSetup.cmake4
1 files changed, 3 insertions, 1 deletions
diff --git a/cmake/QtDeclarativeSetup.cmake b/cmake/QtDeclarativeSetup.cmake
index 024bdb2785..aeb61d70e4 100644
--- a/cmake/QtDeclarativeSetup.cmake
+++ b/cmake/QtDeclarativeSetup.cmake
@@ -16,7 +16,9 @@ function(qt_declarative_write_tag_header target_name)
OUTPUT_VARIABLE QML_COMPILE_HASH
OUTPUT_STRIP_TRAILING_WHITESPACE
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}")
- else()
+ endif()
+ string(LENGTH "${QML_COMPILE_HASH}" QML_COMPILE_HASH_LENGTH)
+ if(QML_COMPILE_HASH_LENGTH EQUAL 0)
set(sources_hash "")
file(GLOB_RECURSE qtqml_source_files "${CMAKE_CURRENT_SOURCE_DIR}/*")
foreach(file IN LISTS qtqml_source_files)