Merge topic 'fix-Qt-rcc-file-handling'
870bd16
QtAutogen: Don't modify target source files while iterating them.
This commit is contained in:
commit
4dd2382a6e
|
@ -810,6 +810,8 @@ void cmQtAutoGenerators::InitializeAutoRccTarget(cmTarget* target)
|
||||||
|
|
||||||
const std::vector<cmSourceFile*>& srcFiles = target->GetSourceFiles();
|
const std::vector<cmSourceFile*>& srcFiles = target->GetSourceFiles();
|
||||||
|
|
||||||
|
std::vector<cmSourceFile*> newFiles;
|
||||||
|
|
||||||
for(std::vector<cmSourceFile*>::const_iterator fileIt = srcFiles.begin();
|
for(std::vector<cmSourceFile*>::const_iterator fileIt = srcFiles.begin();
|
||||||
fileIt != srcFiles.end();
|
fileIt != srcFiles.end();
|
||||||
++fileIt)
|
++fileIt)
|
||||||
|
@ -833,10 +835,17 @@ void cmQtAutoGenerators::InitializeAutoRccTarget(cmTarget* target)
|
||||||
rcc_output_file.c_str(), false);
|
rcc_output_file.c_str(), false);
|
||||||
cmSourceFile* rccCppSource
|
cmSourceFile* rccCppSource
|
||||||
= makefile->GetOrCreateSource(rcc_output_file.c_str(), true);
|
= makefile->GetOrCreateSource(rcc_output_file.c_str(), true);
|
||||||
target->AddSourceFile(rccCppSource);
|
newFiles.push_back(rccCppSource);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for(std::vector<cmSourceFile*>::const_iterator fileIt = newFiles.begin();
|
||||||
|
fileIt != newFiles.end();
|
||||||
|
++fileIt)
|
||||||
|
{
|
||||||
|
target->AddSourceFile(*fileIt);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void cmQtAutoGenerators::SetupAutoRccTarget(cmTarget const* target)
|
void cmQtAutoGenerators::SetupAutoRccTarget(cmTarget const* target)
|
||||||
|
|
Loading…
Reference in New Issue