diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index 59ca38f..61fe562 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -404,9 +404,19 @@ cmGlobalXCodeGenerator::AddExtraTargets(cmLocalGenerator* root,
 
 //----------------------------------------------------------------------------
 void cmGlobalXCodeGenerator::CreateReRunCMakeFile(cmLocalGenerator* root)
-{
+{  
   cmMakefile* mf = root->GetMakefile();
   std::vector<std::string> lfiles = mf->GetListFiles();
+
+  for(std::vector<cmLocalGenerator*>::iterator sdi =
+        root->GetChildren().begin(); sdi != root->GetChildren().end(); ++sdi)
+    {
+      cmLocalGenerator *lg = *sdi;
+      cmMakefile* cmf = lg->GetMakefile();
+      std::vector<std::string> l = cmf->GetListFiles();
+      lfiles.insert(lfiles.end(),l.begin(),l.end());
+    }
+    
   // sort the array
   std::sort(lfiles.begin(), lfiles.end(), std::less<std::string>());
   std::vector<std::string>::iterator new_end =
