From 7a87149c25e04f5f1cbb786fd3b8f78e94574551 Mon Sep 17 00:00:00 2001 From: Orkun Tokdemir Date: Fri, 13 Oct 2023 12:25:24 +0200 Subject: [PATCH] CMake: Update timestamp file for `multi-Config` builds Since https://gitlab.kitware.com/cmake/cmake/-/merge_requests/8840 is merged, the timestamp file for {target}_json_file.txt should be updated for `multi-config` builds too. A possible error message before this commit when `qt6_extract_metatypes()` is called with a newer or equal version than `3.28` `CMake` and `Ninja Multi-Config`. ``` ninja: error: 'src/corelib/Core_autogen/timestamp', needed by 'src/corelib/meta_types/Core_json_file_list.txt', missing and no known rule to make it ``` Amends 8042bfba47305352627d910930e52da496904c17 Pick-to: 6.2 6.5 6.6 Change-Id: Ib404bd058d5f4c75501fb714c2ad9608d6852822 Reviewed-by: Alexandru Croitor --- src/corelib/Qt6CoreMacros.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/Qt6CoreMacros.cmake b/src/corelib/Qt6CoreMacros.cmake index 949982eeb5..093c43dd32 100644 --- a/src/corelib/Qt6CoreMacros.cmake +++ b/src/corelib/Qt6CoreMacros.cmake @@ -1226,7 +1226,7 @@ function(qt6_extract_metatypes target) else() set(use_better_automoc_graph FALSE) if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.28.0" - AND CMAKE_CROSS_CONFIGS) + AND is_multi_config) if(DEFINED QT_USE_BETTER_AUTOMOC_GRAPH) set(use_better_automoc_graph ${QT_USE_BETTER_AUTOMOC_GRAPH}) else()