Merge topic 'fix-Qt-rcc-file-handling'

870bd16 QtAutogen: Don't modify target source files while iterating them.
This commit is contained in:
Brad King 2013-12-23 10:19:24 -05:00 committed by CMake Topic Stage
commit 4dd2382a6e
1 changed files with 10 additions and 1 deletions

View File

@ -810,6 +810,8 @@ void cmQtAutoGenerators::InitializeAutoRccTarget(cmTarget* target)
const std::vector<cmSourceFile*>& srcFiles = target->GetSourceFiles();
std::vector<cmSourceFile*> newFiles;
for(std::vector<cmSourceFile*>::const_iterator fileIt = srcFiles.begin();
fileIt != srcFiles.end();
++fileIt)
@ -833,10 +835,17 @@ void cmQtAutoGenerators::InitializeAutoRccTarget(cmTarget* target)
rcc_output_file.c_str(), false);
cmSourceFile* rccCppSource
= 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)