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 <alexandru.croitor@qt.io>
bb10
Orkun Tokdemir 2023-10-13 12:25:24 +02:00
parent 7fd0397c66
commit 7a87149c25
1 changed files with 1 additions and 1 deletions

View File

@ -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()