Browse Source

fix for bad assumption

Ken Martin 23 years ago
parent
commit
7885db5eaf
1 changed files with 9 additions and 4 deletions
  1. 9 4
      Source/cmLocalVisualStudio6Generator.cxx

+ 9 - 4
Source/cmLocalVisualStudio6Generator.cxx

@@ -256,11 +256,16 @@ void cmLocalVisualStudio6Generator::WriteDSPFile(std::ostream& fout,
   // add in the library depends for cusotm targets
   if (target.GetType() == cmTarget::UTILITY)
     {
-    cmCustomCommand &c = target.GetPostBuildCommands()[0];
-    for (std::vector<std::string>::iterator i = c.GetDepends().begin();
-         i != c.GetDepends().end(); ++i)
+    for (std::vector<cmCustomCommand>::iterator ic = 
+           target.GetPostBuildCommands().begin();
+         ic != target.GetPostBuildCommands().end(); ++ic)
       {
-      srcFilesToProcess.push(*i);
+      cmCustomCommand &c = *ic;
+      for (std::vector<std::string>::iterator i = c.GetDepends().begin();
+           i != c.GetDepends().end(); ++i)
+        {
+        srcFilesToProcess.push(*i);
+        }
       }
     }
   while (!srcFilesToProcess.empty())