diff options
author | Joerg Bornemann <joerg.bornemann@qt.io> | 2020-09-01 15:10:41 +0200 |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@qt.io> | 2020-09-09 12:51:28 +0200 |
commit | 9ac3503d30ed46c63c6a733304072d316f0042cf (patch) | |
tree | 675cb23c9b4085509019569a39e7e57b15972021 /Tests/QtAutogen/Tests.cmake | |
parent | fff360c60c7e428054306fc0f02126ac7fd34410 (diff) | |
download | cmake-9ac3503d30ed46c63c6a733304072d316f0042cf.tar.gz |
AutoMoc: Re-run moc if a dependency is missing
AutoMoc uses the moc-emitted dependency file of Qt 5.15 to track
dependencies. Such a dependency may well live outside the project and
can vanish, for example when installing a new compiler version.
This situation was detected before, but merely a warning was issued.
Now, we're considering a generated file as out of date if a dependency
is missing and re-generate it.
We also have to remove the missing dependency from the ParseCache.
Otherwise the AUTOMOC target for all generators other than Ninja will
always be out of date.
The ParseCacheChanged flag had to be made atomic, because we're
potentially accessing it from multiple threads. The dependencies vector
itself is not vulnerable in this regard, because there's one vector per
file, and we're accessing exactly one ParseCacheT::FileHandleT per thread.
Fixes: #21136
Diffstat (limited to 'Tests/QtAutogen/Tests.cmake')
-rw-r--r-- | Tests/QtAutogen/Tests.cmake | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Tests/QtAutogen/Tests.cmake b/Tests/QtAutogen/Tests.cmake index 0c7bd79148..b1337d6266 100644 --- a/Tests/QtAutogen/Tests.cmake +++ b/Tests/QtAutogen/Tests.cmake @@ -21,6 +21,7 @@ ADD_AUTOGEN_TEST(RccOnly rccOnly) ADD_AUTOGEN_TEST(RccSkipSource) ADD_AUTOGEN_TEST(RerunMocBasic) ADD_AUTOGEN_TEST(RerunMocOnAddFile) +ADD_AUTOGEN_TEST(RerunMocOnMissingDependency) ADD_AUTOGEN_TEST(RerunRccConfigChange) ADD_AUTOGEN_TEST(RerunRccDepends) ADD_AUTOGEN_TEST(SameName sameName) |