diff options
author | Sebastian Holtermann <sebholt@xwmw.org> | 2017-08-10 16:27:52 (GMT) |
---|---|---|
committer | Sebastian Holtermann <sebholt@xwmw.org> | 2017-08-10 16:33:02 (GMT) |
commit | 952fc65d140a1b36fc2e580d7ca89de231a04412 (patch) | |
tree | bac66e23c1e5790e53ee81e293ee822bbeb363c0 /Source/cmQtAutoGeneratorInitializer.cxx | |
parent | 14b2f85cd411ee9d7e19a28d5e2ea7958ab845ee (diff) | |
download | CMake-952fc65d140a1b36fc2e580d7ca89de231a04412.zip CMake-952fc65d140a1b36fc2e580d7ca89de231a04412.tar.gz CMake-952fc65d140a1b36fc2e580d7ca89de231a04412.tar.bz2 |
Autogen: Clear sources meta data cache
Adds cmGeneratorTarget::clearSourcesCache() which clears the cache
of precomputed sources lists and object names. The cache gets
recomputed on demand.
Clearing the cache is necessary in case an OBJECT library
gets a source added after a target (ORIGIN) that includes it
computed it's external sources cache.
This may happen in AUTOMOC when ORIGIN is processed before the
OBJECT library which gets a mocs_compilation.cpp file added.
Closes #17152
Closes #17139
Closes #17085
Closes #15967
Diffstat (limited to 'Source/cmQtAutoGeneratorInitializer.cxx')
-rw-r--r-- | Source/cmQtAutoGeneratorInitializer.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/cmQtAutoGeneratorInitializer.cxx b/Source/cmQtAutoGeneratorInitializer.cxx index 5a06730..2cf2ee9 100644 --- a/Source/cmQtAutoGeneratorInitializer.cxx +++ b/Source/cmQtAutoGeneratorInitializer.cxx @@ -919,6 +919,12 @@ void cmQtAutoGeneratorInitializer::InitializeAutogenTarget( } } + // cmGeneratorTarget::GetConfigCommonSourceFiles computes the target's + // sources meta data cache. Clear it so that OBJECT library targets that + // are AUTOGEN initialized after this target get their added + // mocs_compilation.cpp source acknowledged by this target. + target->ClearSourcesCache(); + // Convert std::set to std::vector const std::vector<std::string> autogenDepends(autogenDependsSet.begin(), autogenDependsSet.end()); |