[cmake-commits] king committed cmLocalVisualStudio6Generator.cxx 1.106 1.107 cmLocalVisualStudio7Generator.cxx 1.154 1.155

cmake-commits at cmake.org cmake-commits at cmake.org
Wed Oct 25 12:49:30 EDT 2006


Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv13150/Source

Modified Files:
	cmLocalVisualStudio6Generator.cxx 
	cmLocalVisualStudio7Generator.cxx 
Log Message:
BUG: Adjust prebuild/prelink/postbuild script construction to account for ConstructScript no longer producing trailing newlines.  This addresses bug#3977.


Index: cmLocalVisualStudio7Generator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmLocalVisualStudio7Generator.cxx,v
retrieving revision 1.154
retrieving revision 1.155
diff -u -d -r1.154 -r1.155
--- cmLocalVisualStudio7Generator.cxx	16 Oct 2006 22:17:14 -0000	1.154
+++ cmLocalVisualStudio7Generator.cxx	25 Oct 2006 16:49:27 -0000	1.155
@@ -1438,6 +1438,10 @@
       fout << "\nCommandLine=\"";
       init = true;
       }
+    else
+      {
+      fout << "\n";
+      }
     std::string script =
       this->ConstructScript(cr->GetCommandLines(),
                             cr->GetWorkingDirectory(),
@@ -1463,6 +1467,10 @@
       fout << "\nCommandLine=\"";
       init = true;
       }
+    else
+      {
+      fout << "\n";
+      }
     std::string script =
       this->ConstructScript(cr->GetCommandLines(),
                             cr->GetWorkingDirectory(),
@@ -1488,6 +1496,10 @@
       fout << "\nCommandLine=\"";
       init = true;
       }
+    else
+      {
+      fout << "\n";
+      }
     std::string script =
       this->ConstructScript(cr->GetCommandLines(),
                             cr->GetWorkingDirectory(),

Index: cmLocalVisualStudio6Generator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmLocalVisualStudio6Generator.cxx,v
retrieving revision 1.106
retrieving revision 1.107
diff -u -d -r1.106 -r1.107
--- cmLocalVisualStudio6Generator.cxx	16 Oct 2006 22:17:14 -0000	1.106
+++ cmLocalVisualStudio6Generator.cxx	25 Oct 2006 16:49:27 -0000	1.107
@@ -766,34 +766,33 @@
     // header stuff
     customRuleCode += "PreLink_Cmds=";
     }
-  const char* prelink_newline = "\\\n\t";
   for (std::vector<cmCustomCommand>::const_iterator cr =
          target.GetPreBuildCommands().begin();
        cr != target.GetPreBuildCommands().end(); ++cr)
     {
-    if(++prelink_count == prelink_total)
+    if(prelink_count++ > 0)
       {
-      prelink_newline = "";
+      customRuleCode += "\\\n\t";
       }
     customRuleCode += this->ConstructScript(cr->GetCommandLines(),
                                             cr->GetWorkingDirectory(),
                                             cr->GetEscapeOldStyle(),
                                             cr->GetEscapeAllowMakeVars(),
-                                            prelink_newline);
+                                            "\\\n\t");
     }
   for (std::vector<cmCustomCommand>::const_iterator cr =
          target.GetPreLinkCommands().begin();
        cr != target.GetPreLinkCommands().end(); ++cr)
     {
-    if(++prelink_count == prelink_total)
+    if(prelink_count++ > 0)
       {
-      prelink_newline = "";
+      customRuleCode += "\\\n\t";
       }
     customRuleCode += this->ConstructScript(cr->GetCommandLines(),
                                             cr->GetWorkingDirectory(),
                                             cr->GetEscapeOldStyle(),
                                             cr->GetEscapeAllowMakeVars(),
-                                            prelink_newline);
+                                            "\\\n\t");
     }
   if(prelink_total > 0)
     {
@@ -814,15 +813,15 @@
          target.GetPostBuildCommands().begin();
        cr != target.GetPostBuildCommands().end(); ++cr)
     {
-    if(++postbuild_count == postbuild_total)
+    if(postbuild_count++ > 0)
       {
-      postbuild_newline = "";
+      customRuleCode += "\\\n\t";
       }
     customRuleCode += this->ConstructScript(cr->GetCommandLines(),
                                             cr->GetWorkingDirectory(),
                                             cr->GetEscapeOldStyle(),
                                             cr->GetEscapeAllowMakeVars(),
-                                            postbuild_newline);
+                                            "\\\n\t");
     }
   if(postbuild_total > 0)
     {



More information about the Cmake-commits mailing list