summaryrefslogtreecommitdiffstats
path: root/Source/cmQtAutoMocUic.cxx
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2020-07-31 15:50:37 (GMT)
committerAlexandru Croitor <alexandru.croitor@qt.io>2020-08-03 17:38:11 (GMT)
commita79056bb023ae99c2e0f09f49b5d525e7b3eff8a (patch)
treecf38248275e2cba6e2e164905c0fe6a9bfe7f5fc /Source/cmQtAutoMocUic.cxx
parent103d6faed9f170b44d8ddf9ea55588a68a165469 (diff)
downloadCMake-a79056bb023ae99c2e0f09f49b5d525e7b3eff8a.zip
CMake-a79056bb023ae99c2e0f09f49b5d525e7b3eff8a.tar.gz
CMake-a79056bb023ae99c2e0f09f49b5d525e7b3eff8a.tar.bz2
AutoGen: Fix over-specified direct dependencies of custom command
The AutoMoc timestamp creating custom command explicitly depended on all dependencies of the origin target (associated to the AutoGen target). When an origin target depended on a shared library 'libfoo.so', if it was re-linked, the AutoMoc custom command would touch its output timestamp file, and thus cause needless rebuilding of sources, despite the shared library not having any influence on the AutoMoc generated files. Introduce a new '<target>_autogen_timestamp_deps' utility target, which will serve as an 'order-only' dependency for the custom command. This will prevent needless rebuilding, because touching 'libfoo.so' will not cause the custom command to be re-executed. The new AutoMoc dependency tree looks like: '_autogen_timestamp_deps (serves as order-only dep)' <- '<target_autogen>/timestamp' file ( + moc deps file) <- '<target>_autogen' target. Fixes: #21020
Diffstat (limited to 'Source/cmQtAutoMocUic.cxx')
-rw-r--r--Source/cmQtAutoMocUic.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/cmQtAutoMocUic.cxx b/Source/cmQtAutoMocUic.cxx
index 893bd6b..f159a3d 100644
--- a/Source/cmQtAutoMocUic.cxx
+++ b/Source/cmQtAutoMocUic.cxx
@@ -2163,7 +2163,9 @@ std::string escapeDependencyPath(cm::string_view path)
void cmQtAutoMocUicT::JobDepFilesMergeT::Process()
{
if (Log().Verbose()) {
- Log().Info(GenT::MOC, "Merging MOC dependencies");
+ Log().Info(GenT::MOC,
+ cmStrCat("Merging MOC dependencies into ",
+ MessagePath(BaseConst().DepFile.c_str())));
}
auto processDepFile =
[](const std::string& mocOutputFile) -> std::vector<std::string> {