[Cmake-commits] [cmake-commits] king committed cmLocalVisualStudio7Generator.cxx 1.220 1.221

cmake-commits at cmake.org cmake-commits at cmake.org
Mon Mar 31 10:59:04 EDT 2008


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

Modified Files:
	cmLocalVisualStudio7Generator.cxx 
Log Message:
ENH: Improve speed of manifest tool on VS8 and VS9.

  - Detect filesystem type where target will be linked
  - Use FAT32 workaround only when fs is FAT or FAT32


Index: cmLocalVisualStudio7Generator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmLocalVisualStudio7Generator.cxx,v
retrieving revision 1.220
retrieving revision 1.221
diff -C 2 -d -r1.220 -r1.221
*** cmLocalVisualStudio7Generator.cxx	28 Mar 2008 02:00:16 -0000	1.220
--- cmLocalVisualStudio7Generator.cxx	31 Mar 2008 14:59:02 -0000	1.221
***************
*** 32,35 ****
--- 32,37 ----
  #include <ctype.h> // for isspace
  
+ static bool cmLVS6G_IsFAT(const char* dir);
+ 
  class cmLocalVisualStudio7GeneratorInternals
  {
***************
*** 662,675 ****
    fout << "\t\t\t\tProxyFileName=\"$(InputName)_p.c\"/>\n";
    // end of <Tool Name=VCMIDLTool
!   
!   // If we are building a version 8 project file, add a flag telling the
!   // manifest tool to use a workaround for FAT32 file systems, which can cause
!   // an empty manifest to be embedded into the resulting executable.
!   // See CMake bug #2617.
    if ( this->Version >= 8 )
      {
!     fout << "\t\t\t<Tool\n\t\t\t\tName=\"VCManifestTool\"\n"
!          << "\t\t\t\tUseFAT32Workaround=\"true\"\n"
!          << "\t\t\t/>\n";
      }
  
--- 664,682 ----
    fout << "\t\t\t\tProxyFileName=\"$(InputName)_p.c\"/>\n";
    // end of <Tool Name=VCMIDLTool
! 
!   // Check if we need the FAT32 workaround.
    if ( this->Version >= 8 )
      {
!     // Check the filesystem type where the target will be written.
!     if(cmLVS6G_IsFAT(target.GetDirectory(configName)))
!       {
!       // Add a flag telling the manifest tool to use a workaround
!       // for FAT32 file systems, which can cause an empty manifest
!       // to be embedded into the resulting executable.  See CMake
!       // bug #2617.
!       fout << "\t\t\t<Tool\n\t\t\t\tName=\"VCManifestTool\"\n"
!            << "\t\t\t\tUseFAT32Workaround=\"true\"\n"
!            << "\t\t\t/>\n";
!       }
      }
  
***************
*** 2055,2056 ****
--- 2062,2081 ----
    dirs.push_back(dir);
  }
+ 
+ //----------------------------------------------------------------------------
+ #include <windows.h>
+ static bool cmLVS6G_IsFAT(const char* dir)
+ {
+   if(dir[0] && dir[1] == ':')
+     {
+     char volRoot[4] = "_:/";
+     volRoot[0] = dir[0];
+     char fsName[16];
+     if(GetVolumeInformation(volRoot, 0, 0, 0, 0, 0, fsName, 16) &&
+        strstr(fsName, "FAT") != 0)
+       {
+       return true;
+       }
+     }
+   return false;
+ }



More information about the Cmake-commits mailing list