mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-02 12:19:54 -05:00
cmNinjaTargetGenerator: avoid traversing old outputs repeatedly
We actually only need to look at outputs just added to the vector, not all outputs that have been detected so far.
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user