Merge topic 'ninja-deterministic-gen'

46fa9583 Ninja: Fix non-determinism in generated target dependency order (#15968)
This commit is contained in:
Brad King 2016-02-16 09:52:25 -05:00 committed by CMake Topic Stage
commit c0a0c7d3f2
1 changed files with 4 additions and 1 deletions

View File

@ -991,6 +991,7 @@ cmGlobalNinjaGenerator
std::set<std::string> const& utils = target->GetUtilities();
std::copy(utils.begin(), utils.end(), std::back_inserter(outputs));
} else {
cmNinjaDeps outs;
cmTargetDependSet const& targetDeps = this->GetTargetDirectDepends(target);
for (cmTargetDependSet::const_iterator i = targetDeps.begin();
i != targetDeps.end(); ++i)
@ -999,8 +1000,10 @@ cmGlobalNinjaGenerator
{
continue;
}
this->AppendTargetOutputs(*i, outputs);
this->AppendTargetOutputs(*i, outs);
}
std::sort(outs.begin(), outs.end());
outputs.insert(outputs.end(), outs.begin(), outs.end());
}
}