summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalXCodeGenerator.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-09-01 18:05:57 (GMT)
committerBrad King <brad.king@kitware.com>2020-09-01 18:05:57 (GMT)
commite33f8f078a289e51636067414ff73d1d1b945552 (patch)
tree741a24742fc8a11f714dca1969f0827f5a592d13 /Source/cmGlobalXCodeGenerator.h
parent8c60c49ae2ac24915931708435f632e66b713f4b (diff)
downloadCMake-e33f8f078a289e51636067414ff73d1d1b945552.zip
CMake-e33f8f078a289e51636067414ff73d1d1b945552.tar.gz
CMake-e33f8f078a289e51636067414ff73d1d1b945552.tar.bz2
Xcode: Avoid unnecessary duplication of custom commands across targets
Do not attach a custom command to a target if it is already attached to one of the target's dependencies. The command's output will be available by the time the target needs it because the dependency containing the command will have already been built. Since commit fb45559e09 (Xcode: Process targets in depth-first order during generation, 2018-07-19, v3.13.0-rc1~293^2) we generate a target only after generating its dependencies. Therefore when visiting the custom commands in a target, we can assume that custom commands in its dependencies have already been visited.
Diffstat (limited to 'Source/cmGlobalXCodeGenerator.h')
-rw-r--r--Source/cmGlobalXCodeGenerator.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/Source/cmGlobalXCodeGenerator.h b/Source/cmGlobalXCodeGenerator.h
index f9b6300..c02cc1d 100644
--- a/Source/cmGlobalXCodeGenerator.h
+++ b/Source/cmGlobalXCodeGenerator.h
@@ -306,6 +306,8 @@ private:
std::string GeneratorToolset;
std::map<cmGeneratorTarget const*, size_t> TargetOrderIndex;
std::vector<std::string> EnabledLangs;
+ std::map<cmGeneratorTarget const*, std::set<cmSourceFile const*>>
+ CommandsVisited;
};
#endif