diff options
author | Brad King <brad.king@kitware.com> | 2013-12-23 15:19:24 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2013-12-23 15:19:24 (GMT) |
commit | 4dd2382a6ede56b1228ed6da94a6a7925fe94d37 (patch) | |
tree | 83dbbf933aeda28d65f6048d8a882c42f995952a /Source | |
parent | 11ddaa51eaa2cf657a9fd46828de5db59f472677 (diff) | |
parent | 870bd16f2c64dc8d74056a47bc7845e8d1b3b2f1 (diff) | |
download | CMake-4dd2382a6ede56b1228ed6da94a6a7925fe94d37.zip CMake-4dd2382a6ede56b1228ed6da94a6a7925fe94d37.tar.gz CMake-4dd2382a6ede56b1228ed6da94a6a7925fe94d37.tar.bz2 |
Merge topic 'fix-Qt-rcc-file-handling'
870bd16 QtAutogen: Don't modify target source files while iterating them.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmQtAutoGenerators.cxx | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx index a561aab..abf20cb 100644 --- a/Source/cmQtAutoGenerators.cxx +++ b/Source/cmQtAutoGenerators.cxx @@ -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) |