diff options
author | Joerg Bornemann <joerg.bornemann@qt.io> | 2020-08-26 15:42:52 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2020-08-31 17:07:23 (GMT) |
commit | 6b20bbd2dd78747cb951d32c12b63c9605971b32 (patch) | |
tree | d45c56f99071d70c0833239587ce0fa7c7c9a52e /Source/cmQtAutoGenInitializer.cxx | |
parent | 9fbd3df21e4059f97a683922635b4b70c8465b3f (diff) | |
download | CMake-6b20bbd2dd78747cb951d32c12b63c9605971b32.zip CMake-6b20bbd2dd78747cb951d32c12b63c9605971b32.tar.gz CMake-6b20bbd2dd78747cb951d32c12b63c9605971b32.tar.bz2 |
AutoMoc: Restore support for re-running after project file changes
For Qt >= 5.15.0 and Ninja generators AutoMoc creates a depfile to let
Ninja decide when to run AutoMoc. This was introduced by commit aebfbcaa46
(AutoGen: Use depfiles for the XXX_autogen ninja targets, 2020-01-14,
v3.17.0-rc1~58^2).
However, AutoMoc was not triggered after adding a new moc-able file to
the project. This patch adds the project file (and potentially included
files) to the dependencies in the depfile.
Now, a re-run of AutoMoc is triggered if the project file changes.
Fixes: #21127
Diffstat (limited to 'Source/cmQtAutoGenInitializer.cxx')
-rw-r--r-- | Source/cmQtAutoGenInitializer.cxx | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Source/cmQtAutoGenInitializer.cxx b/Source/cmQtAutoGenInitializer.cxx index c8caddf..d8b9100 100644 --- a/Source/cmQtAutoGenInitializer.cxx +++ b/Source/cmQtAutoGenInitializer.cxx @@ -1508,6 +1508,7 @@ bool cmQtAutoGenInitializer::SetupWriteAutogenInfo() info.SetConfig("PARSE_CACHE_FILE", this->AutogenTarget.ParseCacheFile); info.Set("DEP_FILE", this->AutogenTarget.DepFile); info.Set("DEP_FILE_RULE_NAME", this->AutogenTarget.DepFileRuleName); + info.SetArray("CMAKE_LIST_FILES", this->Makefile->GetListFiles()); info.SetArray("HEADER_EXTENSIONS", this->Makefile->GetCMakeInstance()->GetHeaderExtensions()); info.SetArrayArray( |