aboutsummaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2022-01-21 09:53:15 +0100
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2022-01-24 06:53:27 +0100
commit839dc73831eb8c4a65702c66b8c42015644cc4a5 (patch)
tree8fda2c240e56d5f3ac8cef3d6dca207c5cc61647 /cmake
parent2cc336bde4833b9ff99699f65ea30aabe6b7b41b (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. Pick-to: 6.2 6.3 Change-Id: Ie9f5642bbfc0cead40138d1f92fe3d673f6dc372 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/QtDeclarativeSetup.cmake4
1 files changed, 3 insertions, 1 deletions
diff --git a/cmake/QtDeclarativeSetup.cmake b/cmake/QtDeclarativeSetup.cmake
index 98ea95dd58..e3125d528a 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)