summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalVisualStudio7Generator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-09-03 19:38:25 (GMT)
committerBrad King <brad.king@kitware.com>2020-09-08 18:52:22 (GMT)
commit8bb5c96bf8bc363afa5da09ce1979614565d31ba (patch)
tree6eb38a64f7c482e9936b3e4af548ee2d9a523af8 /Source/cmLocalVisualStudio7Generator.cxx
parentaea465793e9744fcda0c26dad14c0620b7448f14 (diff)
downloadCMake-8bb5c96bf8bc363afa5da09ce1979614565d31ba.zip
CMake-8bb5c96bf8bc363afa5da09ce1979614565d31ba.tar.gz
CMake-8bb5c96bf8bc363afa5da09ce1979614565d31ba.tar.bz2
cmLocalVisualStudio7Generator: Adopt SourcesVisited lookup table
Move it up the hierarchy from `cmLocalVisualStudio10Generator`. Propagate contents from a target's dependencies as part of the main target iteration logic instead of as part of the generator-specific target generation.
Diffstat (limited to 'Source/cmLocalVisualStudio7Generator.cxx')
-rw-r--r--Source/cmLocalVisualStudio7Generator.cxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx
index 1ebd5da..362c3e7 100644
--- a/Source/cmLocalVisualStudio7Generator.cxx
+++ b/Source/cmLocalVisualStudio7Generator.cxx
@@ -86,6 +86,15 @@ void cmLocalVisualStudio7Generator::Generate()
if (!gt->IsInBuildSystem() || gt->GetProperty("EXTERNAL_MSPROJECT")) {
continue;
}
+
+ auto& gtVisited = this->GetSourcesVisited(gt);
+ auto& deps = this->GlobalGenerator->GetTargetDirectDepends(gt);
+ for (auto& d : deps) {
+ // Take the union of visited source files of custom commands
+ auto depVisited = this->GetSourcesVisited(d);
+ gtVisited.insert(depVisited.begin(), depVisited.end());
+ }
+
this->GenerateTarget(gt);
}