Merge topic 'ninja-deterministic-gen'
46fa9583
Ninja: Fix non-determinism in generated target dependency order (#15968)
This commit is contained in:
commit
c0a0c7d3f2
|
@ -991,6 +991,7 @@ cmGlobalNinjaGenerator
|
||||||
std::set<std::string> const& utils = target->GetUtilities();
|
std::set<std::string> const& utils = target->GetUtilities();
|
||||||
std::copy(utils.begin(), utils.end(), std::back_inserter(outputs));
|
std::copy(utils.begin(), utils.end(), std::back_inserter(outputs));
|
||||||
} else {
|
} else {
|
||||||
|
cmNinjaDeps outs;
|
||||||
cmTargetDependSet const& targetDeps = this->GetTargetDirectDepends(target);
|
cmTargetDependSet const& targetDeps = this->GetTargetDirectDepends(target);
|
||||||
for (cmTargetDependSet::const_iterator i = targetDeps.begin();
|
for (cmTargetDependSet::const_iterator i = targetDeps.begin();
|
||||||
i != targetDeps.end(); ++i)
|
i != targetDeps.end(); ++i)
|
||||||
|
@ -999,8 +1000,10 @@ cmGlobalNinjaGenerator
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
this->AppendTargetOutputs(*i, outputs);
|
this->AppendTargetOutputs(*i, outs);
|
||||||
}
|
}
|
||||||
|
std::sort(outs.begin(), outs.end());
|
||||||
|
outputs.insert(outputs.end(), outs.begin(), outs.end());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue