summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/cmNinjaTargetGenerator.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx
index 0bda945..af47158 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -1048,10 +1048,13 @@ void cmNinjaTargetGenerator::WriteObjectBuildStatements(
cmCustomCommandGenerator ccg(*cc, config, this->GetLocalGenerator());
const std::vector<std::string>& ccoutputs = ccg.GetOutputs();
const std::vector<std::string>& ccbyproducts = ccg.GetByproducts();
+ auto const nPreviousOutputs = ccouts.size();
ccouts.insert(ccouts.end(), ccoutputs.begin(), ccoutputs.end());
ccouts.insert(ccouts.end(), ccbyproducts.begin(), ccbyproducts.end());
if (usePrivateGeneratedSources) {
auto it = ccouts.begin();
+ // Skip over outputs that were already detected.
+ std::advance(it, nPreviousOutputs);
while (it != ccouts.end()) {
cmFileSet const* fileset =
this->GeneratorTarget->GetFileSetForSource(