[cmake-commits] hoffman committed cmake.cxx 1.348 1.349

cmake-commits at cmake.org cmake-commits at cmake.org
Wed Jan 2 09:32:31 EST 2008


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

Modified Files:
	cmake.cxx 
Log Message:
ENH: fix new incremental link stuff to work with nmake @ files


Index: cmake.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmake.cxx,v
retrieving revision 1.348
retrieving revision 1.349
diff -u -d -r1.348 -r1.349
--- cmake.cxx	1 Jan 2008 22:19:11 -0000	1.348
+++ cmake.cxx	2 Jan 2008 14:32:29 -0000	1.349
@@ -3674,17 +3674,45 @@
     {
     verbose = true;
     }
-  // figure out if this is an incremental link or not and run the correct
-  // link function.
+  std::vector<std::string> expandedArgs;
   for(std::vector<std::string>::iterator i = args.begin();
       i != args.end(); ++i)
     {
+    // check for nmake temporary files 
+    if((*i)[0] == '@')
+      {
+      std::ifstream fin(i->substr(1).c_str());
+      std::string line;
+      while(cmSystemTools::GetLineFromStream(fin,
+                                             line))
+        {
+        cmSystemTools::ParseWindowsCommandLine(line.c_str(), expandedArgs);
+        }
+      }
+    else
+      {
+      expandedArgs.push_back(*i);
+      }
+    }
+  // figure out if this is an incremental link or not and run the correct
+  // link function.
+  for(std::vector<std::string>::iterator i = expandedArgs.begin();
+      i != expandedArgs.end(); ++i)
+    {
     if(cmSystemTools::Strucmp(i->c_str(), "/INCREMENTAL:YES") == 0)
       {
-      return cmake::VisualStudioLinkIncremental(args, type, verbose);
+      if(verbose)
+        {
+        std::cout << "Visual Studio Incremental Link\n";
+        }
+      return cmake::VisualStudioLinkIncremental(expandedArgs, type, verbose);
       }
     }
-  return cmake::VisualStudioLinkNonIncremental(args, type, verbose);
+  if(verbose)
+    {
+    std::cout << "Visual Studio Non-Incremental Link\n";
+    }
+  return cmake::VisualStudioLinkNonIncremental(expandedArgs, type, verbose);
 }
 
 int cmake::ParseVisualStudioLinkCommand(std::vector<std::string>& args, 



More information about the Cmake-commits mailing list