diff --git a/Source/cmExtraCodeBlocksGenerator.cxx b/Source/cmExtraCodeBlocksGenerator.cxx index f27226228..7f2605fba 100644 --- a/Source/cmExtraCodeBlocksGenerator.cxx +++ b/Source/cmExtraCodeBlocksGenerator.cxx @@ -263,11 +263,19 @@ void cmExtraCodeBlocksGenerator it != this->GlobalGenerator->GetProjectMap().end(); ++it) { - // Convert - std::vector listFiles = - it->second[0]->GetMakefile()->GetListFiles(); + // Collect all files + std::vector listFiles; + for (std::vector::const_iterator + jt = it->second.begin(); + jt != it->second.end(); + ++jt) + { + const std::vector & files = (*jt)->GetMakefile()->GetListFiles(); + listFiles.insert(listFiles.end(), files.begin(), files.end()); + } - for (std::vector::const_iterator jt = listFiles.begin(); + // Convert + for (std::vector::const_iterator jt = listFiles.begin(); jt != listFiles.end(); ++jt) {