[Cmake-commits] [cmake-commits] hoffman committed cmAuxSourceDirectoryCommand.cxx 1.26 1.26.2.1 cmComputeLinkDepends.cxx 1.12.2.3 1.12.2.4 cmComputeLinkDepends.h 1.5.2.3 1.5.2.4 cmComputeLinkInformation.cxx 1.24.2.5 1.24.2.6 cmComputeLinkInformation.h 1.15.2.1 1.15.2.2 cmExportFileGenerator.cxx 1.11.2.2 1.11.2.3 cmExportLibraryDependencies.cxx 1.22 1.22.2.1 cmFileCommand.cxx 1.103.2.2 1.103.2.3 cmFileCommand.h 1.35.2.1 1.35.2.2 cmGlobalGenerator.cxx 1.227 1.227.2.1 cmGlobalVisualStudio71Generator.cxx 1.48 1.48.2.1 cmGlobalVisualStudio7Generator.cxx 1.99 1.99.2.1 cmGlobalVisualStudioGenerator.cxx 1.11 1.11.2.1 cmGlobalVisualStudioGenerator.h 1.7 1.7.2.1 cmGlobalXCodeGenerator.cxx 1.186.2.1 1.186.2.2 cmListFileCache.cxx 1.41.2.2 1.41.2.3 cmLocalGenerator.cxx 1.269.2.1 1.269.2.2 cmLocalUnixMakefileGenerator3.cxx 1.240.2.4 1.240.2.5 cmLocalVisualStudio7Generator.cxx 1.217.2.4 1.217.2.5 cmLocalVisualStudio7Generator.h 1.50 1.50.2.1 cmMakefile.cxx 1.463.2.2 1.463.2.3 cmMakefile.h 1.230.2.1 1.230.2.2 cmSourceFile.cxx 1.47.2.1 1.47.2.2 cmSourceFile.h 1.25 1.25.2.1 cmWriteFileCommand.cxx 1.16 1.16.2.1 cmake.cxx 1.375.2.4 1.375.2.5 cmake.h 1.109.2.3 1.109.2.4

cmake-commits at cmake.org cmake-commits at cmake.org
Thu May 1 12:35:42 EDT 2008


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

Modified Files:
      Tag: CMake-2-6
	cmAuxSourceDirectoryCommand.cxx cmComputeLinkDepends.cxx 
	cmComputeLinkDepends.h cmComputeLinkInformation.cxx 
	cmComputeLinkInformation.h cmExportFileGenerator.cxx 
	cmExportLibraryDependencies.cxx cmFileCommand.cxx 
	cmFileCommand.h cmGlobalGenerator.cxx 
	cmGlobalVisualStudio71Generator.cxx 
	cmGlobalVisualStudio7Generator.cxx 
	cmGlobalVisualStudioGenerator.cxx 
	cmGlobalVisualStudioGenerator.h cmGlobalXCodeGenerator.cxx 
	cmListFileCache.cxx cmLocalGenerator.cxx 
	cmLocalUnixMakefileGenerator3.cxx 
	cmLocalVisualStudio7Generator.cxx 
	cmLocalVisualStudio7Generator.h cmMakefile.cxx cmMakefile.h 
	cmSourceFile.cxx cmSourceFile.h cmWriteFileCommand.cxx 
	cmake.cxx cmake.h 
Log Message:
ENH: merge from cvs create yikes RC 10! (I hope this is the last RC...)


Index: cmComputeLinkDepends.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmComputeLinkDepends.h,v
retrieving revision 1.5.2.3
retrieving revision 1.5.2.4
diff -C 2 -d -r1.5.2.3 -r1.5.2.4
*** cmComputeLinkDepends.h	23 Apr 2008 12:50:37 -0000	1.5.2.3
--- cmComputeLinkDepends.h	1 May 2008 16:35:39 -0000	1.5.2.4
***************
*** 59,62 ****
--- 59,66 ----
      { return this->OldWrongConfigItems; }
  
+   /** Set a regular expression that matches strings ending in a shared
+       library extension.  */
+   void SetSharedRegex(std::string const& regex);
+ 
  private:
  
***************
*** 138,141 ****
--- 142,146 ----
    std::vector<int> OriginalEntries;
    void PreserveOriginalEntries();
+   std::string SharedRegexString;
  
    // Compatibility help.

Index: cmLocalVisualStudio7Generator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmLocalVisualStudio7Generator.cxx,v
retrieving revision 1.217.2.4
retrieving revision 1.217.2.5
diff -C 2 -d -r1.217.2.4 -r1.217.2.5
*** cmLocalVisualStudio7Generator.cxx	21 Apr 2008 00:44:52 -0000	1.217.2.4
--- cmLocalVisualStudio7Generator.cxx	1 May 2008 16:35:39 -0000	1.217.2.5
***************
*** 69,72 ****
--- 69,73 ----
    lang.insert("IDL");
    lang.insert("DEF");
+   lang.insert("Fortran");
    this->CreateCustomTargetsAndCommands(lang);
    this->FixGlobalTargets();
***************
*** 201,204 ****
--- 202,208 ----
  ::CreateSingleVCProj(const char *lname, cmTarget &target)
  {
+   this->FortranProject =
+     static_cast<cmGlobalVisualStudioGenerator*>(this->GlobalGenerator)
+     ->TargetIsFortranOnly(target);
    // add to the list of projects
    std::string pname = lname;
***************
*** 209,213 ****
    fname += "/";
    fname += lname;
!   fname += ".vcproj";
  
    // Generate the project file and replace it atomically with
--- 213,224 ----
    fname += "/";
    fname += lname;
!   if(this->FortranProject)
!     {
!     fname += ".vfproj";
!     }
!   else
!     {
!     fname += ".vcproj";
!     }
  
    // Generate the project file and replace it atomically with
***************
*** 287,291 ****
--- 298,356 ----
    fout << "\t</Configurations>\n";
  }
+ cmVS7FlagTable cmLocalVisualStudio7GeneratorFortranFlagTable[] =
+ { 
+   {"Preprocess", "fpp", "Run Preprocessor on files", "preprocessYes", 0}, 
+   {"SuppressStartupBanner", "nologo", "SuppressStartupBanner", "true", 0},
+   {"DebugInformationFormat", "Zi", "full debug", "debugEnabled", 0},
+   {"DebugInformationFormat", "debug:full", "full debug", "debugEnabled", 0},
+   {"DebugInformationFormat", "Z7", "c7 compat", "debugOldStyleInfo", 0},
+   {"DebugInformationFormat", "Zd", "line numbers", "debugLineInfoOnly", 0},
+   {"Optimization", "Od", "disable optimization", "optimizeDisabled", 0},
+   {"Optimization", "O1", "min space", "optimizeMinSpace", 0},
+   {"Optimization", "O3", "full optimize", "optimizeFull", 0},
+   {"GlobalOptimizations", "Og", "global optimize", "true", 0},
+   {"InlineFunctionExpansion", "Ob0", "", "expandDisable", 0},
+   {"InlineFunctionExpansion", "Ob1", "", "expandOnlyInline", 0},
+   {"FavorSizeOrSpeed", "Os", "", "favorSize", 0},
+   {"OmitFramePointers", "Oy-", "", "false", 0},
+   {"OptimizeForProcessor", "GB", "", "procOptimizeBlended", 0},
+   {"OptimizeForProcessor", "G5", "", "procOptimizePentium", 0},
+   {"OptimizeForProcessor", "G6", "", "procOptimizePentiumProThruIII", 0},
+   {"UseProcessorExtensions", "QzxK", "", "codeForStreamingSIMD", 0},
+   {"OptimizeForProcessor", "QaxN", "", "codeForPentium4", 0},
+   {"OptimizeForProcessor", "QaxB", "", "codeForPentiumM", 0},
+   {"OptimizeForProcessor", "QaxP", "", "codeForCodeNamedPrescott", 0},
+   {"OptimizeForProcessor", "QaxT", "", "codeForCore2Duo", 0},
+   {"OptimizeForProcessor", "QxK", "", "codeExclusivelyStreamingSIMD", 0},
+   {"OptimizeForProcessor", "QxN", "", "codeExclusivelyPentium4", 0},
+   {"OptimizeForProcessor", "QxB", "", "codeExclusivelyPentiumM", 0},
+   {"OptimizeForProcessor", "QxP", "", "codeExclusivelyCodeNamedPrescott", 0},
+   {"OptimizeForProcessor", "QxT", "", "codeExclusivelyCore2Duo", 0},
+   {"OptimizeForProcessor", "QxO", "", "codeExclusivelyCore2StreamingSIMD", 0},
+   {"OptimizeForProcessor", "QxS", "", "codeExclusivelyCore2StreamingSIMD4", 0},
  
+   {"ModulePath", "module:", "", "", 
+    cmVS7FlagTable::UserValueRequired},
+   {"LoopUnrolling", "Qunroll:", "", "", 
+    cmVS7FlagTable::UserValueRequired},
+   {"AutoParallelThreshold", "Qpar-threshold:", "", "", 
+    cmVS7FlagTable::UserValueRequired},
+   {"HeapArrays", "heap-arrays:", "", "", 
+    cmVS7FlagTable::UserValueRequired},
+   {"ObjectText", "bintext:", "", "", 
+    cmVS7FlagTable::UserValueRequired},
+   {"Parallelization", "Qparallel", "", "true", 0},
+   {"PrefetchInsertion", "Qprefetch-", "", "false", 0},
+   {"BufferedIO", "assume:buffered_io", "", "true", 0},
+   {"CallingConvention", "iface:stdcall", "", "callConventionStdCall", 0},
+   {"CallingConvention", "iface:cref", "", "callConventionCRef", 0},
+   {"CallingConvention", "iface:stdref", "", "callConventionStdRef", 0},
+   {"CallingConvention", "iface:stdcall", "", "callConventionStdCall", 0},
+   {"CallingConvention", "iface:cvf", "", "callConventionCVF", 0},
+   {"EnableRecursion", "recursive", "", "true", 0},
+   {"ReentrantCode", "reentrancy", "", "true", 0},
+   // done up to Language
+   {0,0,0,0,0}
+ };
  // fill the table here currently the comment field is not used for
  // anything other than documentation NOTE: Make sure the longer
***************
*** 380,383 ****
--- 445,450 ----
  };
  
+ 
+ 
  cmVS7FlagTable cmLocalVisualStudio7GeneratorLinkFlagTable[] =
  {
***************
*** 405,409 ****
    {
      Compiler,
!     Linker
    };
    cmLocalVisualStudio7GeneratorOptions(cmLocalVisualStudio7Generator* lg,
--- 472,477 ----
    {
      Compiler,
!     Linker,
!     FortranCompiler
    };
    cmLocalVisualStudio7GeneratorOptions(cmLocalVisualStudio7Generator* lg,
***************
*** 486,496 ****
--- 554,567 ----
    // 10 == utility
    const char* configType = "10";
+   const char* projectType = 0;
    switch(target.GetType())
      {
      case cmTarget::STATIC_LIBRARY:
+       projectType = "typeStaticLibrary";
        configType = "4";
        break;
      case cmTarget::SHARED_LIBRARY:
      case cmTarget::MODULE_LIBRARY:
+       projectType = "typeDynamicLibrary";
        configType = "2";
        break;
***************
*** 504,508 ****
        break;
      }
! 
    std::string flags;
    if(strcmp(configType, "10") != 0)
--- 575,582 ----
        break;
      }
!   if(this->FortranProject && projectType)
!     {
!     configType = projectType;
!     }
    std::string flags;
    if(strcmp(configType, "10") != 0)
***************
*** 517,521 ****
        return;
        }
!     if(strcmp(linkLanguage, "C") == 0 || strcmp(linkLanguage, "CXX") == 0)
        {
        std::string baseFlagVar = "CMAKE_";
--- 591,596 ----
        return;
        }
!     if(strcmp(linkLanguage, "C") == 0 || strcmp(linkLanguage, "CXX") == 0
!       || strcmp(linkLanguage, "Fortran") == 0)
        {
        std::string baseFlagVar = "CMAKE_";
***************
*** 552,558 ****
    // Get preprocessor definitions for this directory.
    std::string defineFlags = this->Makefile->GetDefineFlags();
! 
!   // Construct a set of build options for this target.
!   Options targetOptions(this, this->Version, Options::Compiler, this->ExtraFlagTable);
    targetOptions.FixExceptionHandlingDefault();
    targetOptions.Parse(flags.c_str());
--- 627,636 ----
    // Get preprocessor definitions for this directory.
    std::string defineFlags = this->Makefile->GetDefineFlags();
!   Options::Tool t = Options::Compiler;
!   if(this->FortranProject)
!     {
!     t = Options::FortranCompiler;
!     }
!   Options targetOptions(this, this->Version, t, this->ExtraFlagTable);
    targetOptions.FixExceptionHandlingDefault();
    targetOptions.Parse(flags.c_str());
***************
*** 600,606 ****
      fout << "\t\t\tCharacterSet=\"2\">\n";
      }
! 
    fout << "\t\t\t<Tool\n"
!        << "\t\t\t\tName=\"VCCLCompilerTool\"\n";
    targetOptions.OutputAdditionalOptions(fout, "\t\t\t\t", "\n");
    fout << "\t\t\t\tAdditionalIncludeDirectories=\"";
--- 678,706 ----
      fout << "\t\t\tCharacterSet=\"2\">\n";
      }
!   const char* tool = "VCCLCompilerTool";
!   if(this->FortranProject)
!     {
!     tool = "VFFortranCompilerTool";
!     }
    fout << "\t\t\t<Tool\n"
!        << "\t\t\t\tName=\"" << tool << "\"\n";
!   if(this->FortranProject)
!     {
!     const char* target_mod_dir =
!       target.GetProperty("Fortran_MODULE_DIRECTORY"); 
!     std::string modDir;
!     if(target_mod_dir)
!       {
!       modDir = this->Convert(target_mod_dir,
!                              cmLocalGenerator::START_OUTPUT,
!                              cmLocalGenerator::UNCHANGED);
!       }
!     else
!       {
!       modDir = ".";
!       }
!     fout << "\t\t\t\tModulePath=\"" 
!          << this->ConvertToXMLOutputPath(modDir.c_str()) << "\\$(ConfigurationName)\"\n";
!     }
    targetOptions.OutputAdditionalOptions(fout, "\t\t\t\t", "\n");
    fout << "\t\t\t\tAdditionalIncludeDirectories=\"";
***************
*** 610,615 ****
--- 710,725 ----
    for(;i != includes.end(); ++i)
      {
+     // output the include path
      std::string ipath = this->ConvertToXMLOutputPath(i->c_str());
      fout << ipath << ";";
+     // if this is fortran then output the include with 
+     // a ConfigurationName on the end of it.
+     if(this->FortranProject)
+       {
+       ipath = i->c_str();
+       ipath += "/$(ConfigurationName)";
+       ipath = this->ConvertToXMLOutputPath(ipath.c_str());
+       fout << ipath << ";";
+       }
      }
    fout << "\"\n";
***************
*** 630,635 ****
      }
    fout << "/>\n";  // end of <Tool Name=VCCLCompilerTool
!   fout << "\t\t\t<Tool\n\t\t\t\tName=\"VCCustomBuildTool\"/>\n";
!   fout << "\t\t\t<Tool\n\t\t\t\tName=\"VCResourceCompilerTool\"\n"
         << "\t\t\t\tAdditionalIncludeDirectories=\"";
    for(i = includes.begin();i != includes.end(); ++i)
--- 740,755 ----
      }
    fout << "/>\n";  // end of <Tool Name=VCCLCompilerTool
!   tool = "VCCustomBuildTool";
!   if(this->FortranProject)
!     {
!     tool = "VFCustomBuildTool";
!     }
!   fout << "\t\t\t<Tool\n\t\t\t\tName=\"" << tool << "\"/>\n";
!   tool = "VCResourceCompilerTool";
!   if(this->FortranProject)
!     {
!     tool = "VFResourceCompilerTool";
!     }
!   fout << "\t\t\t<Tool\n\t\t\t\tName=\"" << tool << "\"\n"
         << "\t\t\t\tAdditionalIncludeDirectories=\"";
    for(i = includes.begin();i != includes.end(); ++i)
***************
*** 642,647 ****
    targetOptions.OutputPreprocessorDefinitions(fout, "\n\t\t\t\t", "");
    fout << "/>\n";
! 
!   fout << "\t\t\t<Tool\n\t\t\t\tName=\"VCMIDLTool\"\n";
    targetOptions.OutputPreprocessorDefinitions(fout, "\t\t\t\t", "\n");
    fout << "\t\t\t\tMkTypLibCompatible=\"FALSE\"\n";
--- 762,771 ----
    targetOptions.OutputPreprocessorDefinitions(fout, "\n\t\t\t\t", "");
    fout << "/>\n";
!   tool = "VCMIDLTool";
!   if(this->FortranProject)
!     {
!     tool = "VFMIDLTool";
!     }
!   fout << "\t\t\t<Tool\n\t\t\t\tName=\"" << tool << "\"\n";
    targetOptions.OutputPreprocessorDefinitions(fout, "\t\t\t\t", "\n");
    fout << "\t\t\t\tMkTypLibCompatible=\"FALSE\"\n";
***************
*** 676,681 ****
        // 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";
--- 800,810 ----
        // for FAT32 file systems, which can cause an empty manifest
        // to be embedded into the resulting executable.  See CMake
!       // bug #2617. 
!       const char* tool  = "VCManifestTool";
!       if(this->FortranProject)
!         {
!         tool = "VFManifestTool";
!         }
!       fout << "\t\t\t<Tool\n\t\t\t\tName=\"" << tool << "\"\n"
             << "\t\t\t\tUseFAT32Workaround=\"true\"\n"
             << "\t\t\t/>\n";
***************
*** 758,763 ****
      libpath += "/";
      libpath += targetNameFull;
      fout << "\t\t\t<Tool\n"
!          << "\t\t\t\tName=\"VCLibrarianTool\"\n";
      if(const char* libflags = target.GetProperty("STATIC_LIBRARY_FLAGS"))
        {
--- 887,897 ----
      libpath += "/";
      libpath += targetNameFull;
+     const char* tool = "VCLibrarianTool";
+     if(this->FortranProject)
+       {
+       tool = "VFLibrarianTool";
+       }
      fout << "\t\t\t<Tool\n"
!          << "\t\t\t\tName=\"" << tool << "\"\n";
      if(const char* libflags = target.GetProperty("STATIC_LIBRARY_FLAGS"))
        {
***************
*** 793,799 ****
      standardLibsVar += linkLanguage;
      standardLibsVar += "_STANDARD_LIBRARIES";
! 
      fout << "\t\t\t<Tool\n"
!          << "\t\t\t\tName=\"VCLinkerTool\"\n";
      linkOptions.OutputAdditionalOptions(fout, "\t\t\t\t", "\n");
      // Use the NOINHERIT macro to avoid getting VS project default
--- 927,937 ----
      standardLibsVar += linkLanguage;
      standardLibsVar += "_STANDARD_LIBRARIES";
!     const char* tool = "VCLinkerTool";
!     if(this->FortranProject)
!       {
!       tool = "VFLinkerTool";
!       }
      fout << "\t\t\t<Tool\n"
!          << "\t\t\t\tName=\"" << tool << "\"\n";
      linkOptions.OutputAdditionalOptions(fout, "\t\t\t\t", "\n");
      // Use the NOINHERIT macro to avoid getting VS project default
***************
*** 862,868 ****
      standardLibsVar += linkLanguage;
      standardLibsVar += "_STANDARD_LIBRARIES";
! 
      fout << "\t\t\t<Tool\n"
!          << "\t\t\t\tName=\"VCLinkerTool\"\n";
      linkOptions.OutputAdditionalOptions(fout, "\t\t\t\t", "\n");
      // Use the NOINHERIT macro to avoid getting VS project default
--- 1000,1010 ----
      standardLibsVar += linkLanguage;
      standardLibsVar += "_STANDARD_LIBRARIES";
!     const char* tool = "VCLinkerTool";
!     if(this->FortranProject)
!       {
!       tool = "VFLinkerTool";
!       }
      fout << "\t\t\t<Tool\n"
!          << "\t\t\t\tName=\"" << tool << "\"\n";
      linkOptions.OutputAdditionalOptions(fout, "\t\t\t\t", "\n");
      // Use the NOINHERIT macro to avoid getting VS project default
***************
*** 1264,1275 ****
            {
            aCompilerTool = "VCMIDLTool";
            }
          if(ext == "rc")
            {
!           aCompilerTool = "VCResourceCompilerTool";
            }
          if(ext == "def")
            {
            aCompilerTool = "VCCustomBuildTool";
            }
          for(std::map<cmStdString, cmLVS7GFileConfig>::const_iterator
--- 1406,1429 ----
            {
            aCompilerTool = "VCMIDLTool";
+           if(this->FortranProject)
+             {
+             aCompilerTool = "VFMIDLTool";
+             }
            }
          if(ext == "rc")
            {
!           aCompilerTool = "VCResourceCompilerTool";  
!           if(this->FortranProject)
!             {
!             aCompilerTool = "VFResourceCompilerTool";
!             }
            }
          if(ext == "def")
            {
            aCompilerTool = "VCCustomBuildTool";
+           if(this->FortranProject)
+             {
+             aCompilerTool = "VFCustomBuildTool";
+             }
            }
          for(std::map<cmStdString, cmLVS7GFileConfig>::const_iterator
***************
*** 1347,1351 ****
      static_cast<cmGlobalVisualStudio7Generator *>
      (this->GlobalGenerator)->GetConfigurations();
! 
    for(i = configs->begin(); i != configs->end(); ++i)
      {
--- 1501,1514 ----
      static_cast<cmGlobalVisualStudio7Generator *>
      (this->GlobalGenerator)->GetConfigurations();
!   const char* compileTool = "VCCLCompilerTool";
!   if(this->FortranProject)
!     {
!     compileTool = "VFCLCompilerTool";
!     }
!   const char* customTool = "VCCustomBuildTool";
!   if(this->FortranProject)
!     {
!     customTool = "VFCustomBuildTool";
!     }
    for(i = configs->begin(); i != configs->end(); ++i)
      {
***************
*** 1356,1360 ****
        {
        fout << "\t\t\t\t\t<Tool\n"
!            << "\t\t\t\t\tName=\"VCCLCompilerTool\"\n"
             << "\t\t\t\t\tAdditionalOptions=\""
             << this->EscapeForXML(fc.CompileFlags.c_str()) << "\"/>\n";
--- 1519,1523 ----
        {
        fout << "\t\t\t\t\t<Tool\n"
!            << "\t\t\t\t\tName=\"" << compileTool << "\"\n"
             << "\t\t\t\t\tAdditionalOptions=\""
             << this->EscapeForXML(fc.CompileFlags.c_str()) << "\"/>\n";
***************
*** 1368,1372 ****
                              command.GetEscapeAllowMakeVars());
      fout << "\t\t\t\t\t<Tool\n"
!          << "\t\t\t\t\tName=\"VCCustomBuildTool\"\n"
           << "\t\t\t\t\tDescription=\"" 
           << this->EscapeForXML(comment.c_str()) << "\"\n"
--- 1531,1535 ----
                              command.GetEscapeAllowMakeVars());
      fout << "\t\t\t\t\t<Tool\n"
!          << "\t\t\t\t\tName=\"" << customTool << "\"\n"
           << "\t\t\t\t\tDescription=\"" 
           << this->EscapeForXML(comment.c_str()) << "\"\n"
***************
*** 1451,1457 ****
      return;
      }
! 
    // add the pre build rules
!   fout << "\t\t\t<Tool\n\t\t\t\tName=\"VCPreBuildEventTool\"";
    bool init = false;
    for (std::vector<cmCustomCommand>::const_iterator cr =
--- 1614,1624 ----
      return;
      }
!   const char* tool = "VCPreBuildEventTool";
!   if(this->FortranProject)
!     {
!     tool = "VFPreBuildEventTool";
!     }
    // add the pre build rules
!   fout << "\t\t\t<Tool\n\t\t\t\tName=\"" << tool << "\"";
    bool init = false;
    for (std::vector<cmCustomCommand>::const_iterator cr =
***************
*** 1489,1493 ****
  
    // add the pre Link rules
!   fout << "\t\t\t<Tool\n\t\t\t\tName=\"VCPreLinkEventTool\"";
    init = false;
    for (std::vector<cmCustomCommand>::const_iterator cr =
--- 1656,1665 ----
  
    // add the pre Link rules
!   tool = "VCPreLinkEventTool";
!   if(this->FortranProject)
!     {
!     tool = "VFPreLinkEventTool";
!     }
!   fout << "\t\t\t<Tool\n\t\t\t\tName=\"" << tool << "\"";
    init = false;
    for (std::vector<cmCustomCommand>::const_iterator cr =
***************
*** 1525,1529 ****
  
    // add the PostBuild rules
!   fout << "\t\t\t<Tool\n\t\t\t\tName=\"VCPostBuildEventTool\"";
    init = false;
    for (std::vector<cmCustomCommand>::const_iterator cr =
--- 1697,1706 ----
  
    // add the PostBuild rules
!   tool = "VCPostBuildEventTool";
!   if(this->FortranProject)
!     {
!     tool = "VFPostBuildEventTool";
!     }
!   fout << "\t\t\t<Tool\n\t\t\t\tName=\"" << tool << "\"";
    init = false;
    for (std::vector<cmCustomCommand>::const_iterator cr =
***************
*** 1562,1565 ****
--- 1739,1802 ----
  
  void
+ cmLocalVisualStudio7Generator
+ ::WriteProjectStartFortran(std::ostream& fout,
+                            const char *libName,
+                            cmTarget & target)
+ {
+   
+   cmGlobalVisualStudio7Generator* gg =
+     static_cast<cmGlobalVisualStudio7Generator *>(this->GlobalGenerator);
+   fout << "<?xml version=\"1.0\" encoding = \"Windows-1252\"?>\n"
+        << "<VisualStudioProject\n"
+        << "\tProjectCreator=\"Intel Fortran\"\n"
+        << "\tVersion=\"9.10\"\n";
+   const char* keyword = target.GetProperty("VS_KEYWORD");
+   if(!keyword)
+     {
+     keyword = "Console Application";
+     } 
+   const char* projectType = 0;
+   switch(target.GetType())
+     {
+     case cmTarget::STATIC_LIBRARY:
+       projectType = "typeStaticLibrary";
+       if(keyword)
+         {
+         keyword = "Static Library";
+         }
+       break;
+     case cmTarget::SHARED_LIBRARY:
+     case cmTarget::MODULE_LIBRARY:
+       projectType = "typeDynamicLibrary";
+       if(!keyword)
+         {
+         keyword = "Dll";
+         }
+       break;
+     case cmTarget::EXECUTABLE:
+       if(!keyword)
+         {
+         keyword = "Console Application";
+         }
+       projectType = 0;
+       break;
+     case cmTarget::UTILITY:
+     case cmTarget::GLOBAL_TARGET:
+     default:
+       break;
+     }
+   if(projectType)
+     {
+     fout << "\tProjectType=\"" << projectType << "\">\n";
+     }
+   fout<< "\tKeyword=\"" << keyword << "\">\n" 
+        << "\tProjectGUID=\"{" << gg->GetGUID(libName) << "}\">\n"
+        << "\t<Platforms>\n"
+        << "\t\t<Platform\n\t\t\tName=\"" << this->PlatformName << "\"/>\n"
+        << "\t</Platforms>\n";
+ }
+ 
+ 
+ void
  cmLocalVisualStudio7Generator::WriteProjectStart(std::ostream& fout,
                                                   const char *libName,
***************
*** 1567,1570 ****
--- 1804,1812 ----
                                                   std::vector<cmSourceGroup> &)
  {
+   if(this->FortranProject)
+     {
+     this->WriteProjectStartFortran(fout, libName, target);
+     return;
+     }
    fout << "<?xml version=\"1.0\" encoding = \"Windows-1252\"?>\n"
         << "<VisualStudioProject\n"
***************
*** 1778,1781 ****
--- 2020,2025 ----
      case Linker:
        this->FlagTable = cmLocalVisualStudio7GeneratorLinkFlagTable; break;
+     case FortranCompiler:
+       this->FlagTable = cmLocalVisualStudio7GeneratorFortranFlagTable;
      default: break;
      }

Index: cmLocalVisualStudio7Generator.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmLocalVisualStudio7Generator.h,v
retrieving revision 1.50
retrieving revision 1.50.2.1
diff -C 2 -d -r1.50 -r1.50.2.1
*** cmLocalVisualStudio7Generator.h	30 Jan 2008 17:04:38 -0000	1.50
--- cmLocalVisualStudio7Generator.h	1 May 2008 16:35:39 -0000	1.50.2.1
***************
*** 103,106 ****
--- 103,108 ----
    void WriteProjectStart(std::ostream& fout, const char *libName,
                           cmTarget &tgt, std::vector<cmSourceGroup> &sgs);
+   void WriteProjectStartFortran(std::ostream& fout, const char *libName,
+                                 cmTarget &tgt);
    void WriteVCProjBeginGroup(std::ostream& fout, 
                            const char* group,
***************
*** 125,128 ****
--- 127,131 ----
    std::string ModuleDefinitionFile;
    int Version;
+   bool FortranProject;
    std::string PlatformName; // Win32 or x64 
    cmLocalVisualStudio7GeneratorInternals* Internal;

Index: cmExportFileGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmExportFileGenerator.cxx,v
retrieving revision 1.11.2.2
retrieving revision 1.11.2.3
diff -C 2 -d -r1.11.2.2 -r1.11.2.3
*** cmExportFileGenerator.cxx	31 Mar 2008 21:57:41 -0000	1.11.2.2
--- cmExportFileGenerator.cxx	1 May 2008 16:35:39 -0000	1.11.2.3
***************
*** 80,83 ****
--- 80,89 ----
    std::ostream& os = *foutPtr;
  
+   // Protect that file against use with older CMake versions.
+   os << "# Generated by CMake " << cmVersion::GetCMakeVersion() << "\n\n";
+   os << "IF(\"${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}\" LESS 2.5)\n"
+      << "   MESSAGE(FATAL_ERROR \"CMake >= 2.6.0 required\")\n"
+      << "ENDIF(\"${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}\" LESS 2.5)\n";
+ 
    // Isolate the file policy level.
    // We use 2.6 here instead of the current version because newer

Index: cmake.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmake.h,v
retrieving revision 1.109.2.3
retrieving revision 1.109.2.4
diff -C 2 -d -r1.109.2.3 -r1.109.2.4
*** cmake.h	8 Apr 2008 16:22:51 -0000	1.109.2.3
--- cmake.h	1 May 2008 16:35:40 -0000	1.109.2.4
***************
*** 295,303 ****
    void DebugTryCompileOn(){this->DebugTryCompile = true;}
  
-   ///! Get the list of files written by CMake using FILE(WRITE / WRITE_FILE
-   void AddWrittenFile(const char* file);
-   bool HasWrittenFile(const char* file);
-   void CleanupWrittenFiles();
- 
    /**
     * Generate CMAKE_ROOT and CMAKE_COMMAND cache entries
--- 295,298 ----
***************
*** 390,394 ****
    bool SuppressDevWarnings;
    bool DoSuppressDevWarnings;
-   std::set<cmStdString> WrittenFiles;
  
    ///! return true if the same cmake was used to make the cache.
--- 385,388 ----

Index: cmGlobalGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalGenerator.cxx,v
retrieving revision 1.227
retrieving revision 1.227.2.1
diff -C 2 -d -r1.227 -r1.227.2.1
*** cmGlobalGenerator.cxx	4 Mar 2008 23:41:52 -0000	1.227
--- cmGlobalGenerator.cxx	1 May 2008 16:35:39 -0000	1.227.2.1
***************
*** 913,917 ****
      this->CMakeInstance->UpdateProgress
        ("Configuring", 0.9f+0.1f*(i+1.0f)/this->LocalGenerators.size());
-     this->LocalGenerators[i]->GetMakefile()->CheckInfiniteLoops();
      }
  
--- 913,916 ----

Index: cmComputeLinkInformation.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmComputeLinkInformation.h,v
retrieving revision 1.15.2.1
retrieving revision 1.15.2.2
diff -C 2 -d -r1.15.2.1 -r1.15.2.2
*** cmComputeLinkInformation.h	18 Mar 2008 14:23:54 -0000	1.15.2.1
--- cmComputeLinkInformation.h	1 May 2008 16:35:39 -0000	1.15.2.2
***************
*** 130,133 ****
--- 130,134 ----
    cmsys::RegularExpression ExtractSharedLibraryName;
    cmsys::RegularExpression ExtractAnyLibraryName;
+   std::string SharedRegexString;
    void AddLinkPrefix(const char* p);
    void AddLinkExtension(const char* e, LinkType type);

Index: cmGlobalXCodeGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalXCodeGenerator.cxx,v
retrieving revision 1.186.2.1
retrieving revision 1.186.2.2
diff -C 2 -d -r1.186.2.1 -r1.186.2.2
*** cmGlobalXCodeGenerator.cxx	8 Apr 2008 16:22:49 -0000	1.186.2.1
--- cmGlobalXCodeGenerator.cxx	1 May 2008 16:35:39 -0000	1.186.2.2
***************
*** 2452,2463 ****
    const char* sysroot = 
        this->CurrentMakefile->GetDefinition("CMAKE_OSX_SYSROOT");
    if(osxArch && sysroot)
      {
      // recompute this as it may have been changed since enable language
      this->Architectures.clear();
      cmSystemTools::ExpandListArgument(std::string(osxArch),
                                        this->Architectures);
!     if(this->Architectures.size() > 1)
        {
        buildSettings->AddAttribute("SDKROOT", 
                                    this->CreateString(sysroot));
--- 2452,2478 ----
    const char* sysroot = 
        this->CurrentMakefile->GetDefinition("CMAKE_OSX_SYSROOT");
+   const char* sysrootDefault = 
+     this->CurrentMakefile->GetDefinition("CMAKE_OSX_SYSROOT_DEFAULT");
    if(osxArch && sysroot)
      {
+     bool flagsUsed = false;
      // recompute this as it may have been changed since enable language
      this->Architectures.clear();
      cmSystemTools::ExpandListArgument(std::string(osxArch),
                                        this->Architectures);
!     bool addArchFlag = true;
!     if(this->Architectures.size() == 1)
        {
+       const char* archOrig = 
+         this->
+         CurrentMakefile->GetSafeDefinition("CMAKE_OSX_ARCHITECTURES_DEFAULT");
+       if(this->Architectures[0] == archOrig)
+         {
+         addArchFlag = false;
+         }
+       }
+     if(addArchFlag)
+       {
+       flagsUsed = true;
        buildSettings->AddAttribute("SDKROOT", 
                                    this->CreateString(sysroot));
***************
*** 2473,2476 ****
--- 2488,2497 ----
                                    this->CreateString(archString.c_str()));
        }
+     if(!flagsUsed && sysrootDefault &&
+        strcmp(sysroot, sysrootDefault) != 0)
+       {
+       buildSettings->AddAttribute("SDKROOT", 
+                                   this->CreateString(sysroot));
+       }
      }
    for( std::vector<cmXCodeObject*>::iterator i = configs.begin();

Index: cmGlobalVisualStudioGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalVisualStudioGenerator.cxx,v
retrieving revision 1.11
retrieving revision 1.11.2.1
diff -C 2 -d -r1.11 -r1.11.2.1
*** cmGlobalVisualStudioGenerator.cxx	15 Feb 2008 16:49:58 -0000	1.11
--- cmGlobalVisualStudioGenerator.cxx	1 May 2008 16:35:39 -0000	1.11.2.1
***************
*** 705,706 ****
--- 705,720 ----
      }
  }
+ bool cmGlobalVisualStudioGenerator::TargetIsFortranOnly(cmTarget& target)
+ {
+   // check to see if this is a fortran build
+   std::set<cmStdString> languages;
+   target.GetLanguages(languages);
+   if(languages.size() == 1)
+     {
+     if(*languages.begin() == "Fortran")
+       {
+       return true;
+       }
+     }
+   return false;
+ }

Index: cmake.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmake.cxx,v
retrieving revision 1.375.2.4
retrieving revision 1.375.2.5
diff -C 2 -d -r1.375.2.4 -r1.375.2.5
*** cmake.cxx	8 Apr 2008 16:22:51 -0000	1.375.2.4
--- cmake.cxx	1 May 2008 16:35:40 -0000	1.375.2.5
***************
*** 2082,2087 ****
      }
  
-   this->CleanupWrittenFiles();
- 
    // Truncate log files
    if (!this->InTryCompile)
--- 2082,2085 ----
***************
*** 2534,2552 ****
  }
  
- void cmake::AddWrittenFile(const char* file)
- {
-   this->WrittenFiles.insert(file);
- }
- 
- bool cmake::HasWrittenFile(const char* file)
- {
-   return this->WrittenFiles.find(file) != this->WrittenFiles.end();
- }
- 
- void cmake::CleanupWrittenFiles()
- {
-   this->WrittenFiles.clear();
- }
- 
  void cmake::UpdateConversionPathTable()
  {
--- 2532,2535 ----

Index: cmSourceFile.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmSourceFile.h,v
retrieving revision 1.25
retrieving revision 1.25.2.1
diff -C 2 -d -r1.25 -r1.25.2.1
*** cmSourceFile.h	30 Jan 2008 16:21:54 -0000	1.25
--- cmSourceFile.h	1 May 2008 16:35:40 -0000	1.25.2.1
***************
*** 117,120 ****
--- 117,121 ----
    bool TryFullPath(const char* tryPath, const char* ext);
    void CheckExtension();
+   void CheckLanguage(std::string const& ext);
  
    std::vector<std::string> Depends;

Index: cmMakefile.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmMakefile.cxx,v
retrieving revision 1.463.2.2
retrieving revision 1.463.2.3
diff -C 2 -d -r1.463.2.2 -r1.463.2.3
*** cmMakefile.cxx	31 Mar 2008 21:57:41 -0000	1.463.2.2
--- cmMakefile.cxx	1 May 2008 16:35:39 -0000	1.463.2.3
***************
*** 84,88 ****
    this->AddSourceGroup
      ("Source Files",
!      "\\.(C|M|c|c\\+\\+|cc|cpp|cxx|m|mm|rc|def|r|odl|idl|hpj|bat)$");
    this->AddSourceGroup("Header Files",
                         "\\.(h|hh|h\\+\\+|hm|hpp|hxx|in|txx|inl)$");
--- 84,88 ----
    this->AddSourceGroup
      ("Source Files",
!      "\\.(C|M|c|c\\+\\+|cc|cpp|cxx|f|f90|for|fpp|ftn|m|mm|rc|def|r|odl|idl|hpj|bat)$");
    this->AddSourceGroup("Header Files",
                         "\\.(h|hh|h\\+\\+|hm|hpp|hxx|in|txx|inl)$");
***************
*** 300,309 ****
      this->GetBacktrace(backtrace);
      }
!   else if(!this->ListFileStack.empty())
      {
-     // We are processing the project but are not currently executing a
-     // command.  Add whatever context information we have.
      cmListFileContext lfc;
!     lfc.FilePath = this->ListFileStack.back();
      lfc.Line = 0;
      if(!this->GetCMakeInstance()->GetIsInTryCompile())
--- 300,318 ----
      this->GetBacktrace(backtrace);
      }
!   else
      {
      cmListFileContext lfc;
!     if(this->ListFileStack.empty())
!       {
!       // We are not processing the project.  Add the directory-level context.
!       lfc.FilePath = this->GetCurrentDirectory();
!       lfc.FilePath += "/CMakeLists.txt";
!       }
!     else
!       {
!       // We are processing the project but are not currently executing a
!       // command.  Add whatever context information we have.
!       lfc.FilePath = this->ListFileStack.back();
!       }
      lfc.Line = 0;
      if(!this->GetCMakeInstance()->GetIsInTryCompile())
***************
*** 2788,2818 ****
  }
  
- void cmMakefile::AddWrittenFile(const char* file)
- { this->GetCMakeInstance()->AddWrittenFile(file); }
- 
- bool cmMakefile::HasWrittenFile(const char* file)
- { return this->GetCMakeInstance()->HasWrittenFile(file); }
- 
- bool cmMakefile::CheckInfiniteLoops()
- {
-   std::vector<std::string>::iterator it;
-   for ( it = this->ListFiles.begin();
-         it != this->ListFiles.end();
-         ++ it )
-     {
-     if ( this->HasWrittenFile(it->c_str()) )
-       {
-       cmOStringStream str;
-       str << "File " << it->c_str() <<
-         " is written by WRITE_FILE (or FILE WRITE) command and should "
-         "not be used as input to CMake. Please use CONFIGURE_FILE to "
-         "be safe. Refer to the note next to FILE WRITE command.";
-       cmSystemTools::Error(str.str().c_str());
-       return false;
-       }
-     }
-   return true;
- }
- 
  void cmMakefile::SetProperty(const char* prop, const char* value)
  {
--- 2797,2800 ----

Index: cmLocalGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmLocalGenerator.cxx,v
retrieving revision 1.269.2.1
retrieving revision 1.269.2.2
diff -C 2 -d -r1.269.2.1 -r1.269.2.2
*** cmLocalGenerator.cxx	30 Mar 2008 13:09:24 -0000	1.269.2.1
--- cmLocalGenerator.cxx	1 May 2008 16:35:39 -0000	1.269.2.2
***************
*** 1628,1631 ****
--- 1628,1634 ----
      const char* sysroot = 
        this->Makefile->GetDefinition("CMAKE_OSX_SYSROOT");
+     const char* sysrootDefault = 
+       this->Makefile->GetDefinition("CMAKE_OSX_SYSROOT_DEFAULT");
+     bool flagsUsed = false;
      if(osxArch && sysroot  && lang && lang[0] =='C')
        { 
***************
*** 1657,1662 ****
--- 1660,1672 ----
          flags += " -isysroot ";
          flags += sysroot;
+         flagsUsed = true;
          }
        }
+     if(!flagsUsed && sysroot && sysrootDefault &&
+        strcmp(sysroot, sysrootDefault) != 0)
+       {
+       flags += " -isysroot ";
+       flags += sysroot;
+       }
      }
    this->AddConfigVariableFlags(flags, flagsVar.c_str(), config);
***************
*** 2536,2542 ****
--- 2546,2575 ----
  
  //----------------------------------------------------------------------------
+ static bool cmLocalGeneratorIsShellOperator(const char* str)
+ {
+   if(strcmp(str, "<") == 0 ||
+      strcmp(str, ">") == 0 ||
+      strcmp(str, "<<") == 0 ||
+      strcmp(str, ">>") == 0 ||
+      strcmp(str, "|") == 0 ||
+      strcmp(str, "&>") == 0 ||
+      strcmp(str, "2>&1") == 0 ||
+      strcmp(str, "1>&2") == 0)
+     {
+     return true;
+     }
+   return false;
+ }
+ 
+ //----------------------------------------------------------------------------
  std::string cmLocalGenerator::EscapeForShell(const char* str, bool makeVars,
                                               bool forEcho)
  {
+   // Do not escape shell operators.
+   if(cmLocalGeneratorIsShellOperator(str))
+     {
+     return str;
+     }
+ 
    // Compute the flags for the target shell environment.
    int flags = 0;
***************
*** 2584,2588 ****
      {
      cmsysSystem_Shell_GetArgumentForUnix(str, &arg[0], flags);
!     }
    return std::string(&arg[0]);
  }
--- 2617,2621 ----
      {
      cmsysSystem_Shell_GetArgumentForUnix(str, &arg[0], flags);
!     }  
    return std::string(&arg[0]);
  }

Index: cmListFileCache.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmListFileCache.cxx,v
retrieving revision 1.41.2.2
retrieving revision 1.41.2.3
diff -C 2 -d -r1.41.2.2 -r1.41.2.3
*** cmListFileCache.cxx	31 Mar 2008 21:57:41 -0000	1.41.2.2
--- cmListFileCache.cxx	1 May 2008 16:35:39 -0000	1.41.2.3
***************
*** 135,139 ****
        }
      }
!     // if no policy command is found this is an error if they use any non advanced functions or a lot of functions
      if(!hasVersion)
      {
--- 135,140 ----
        }
      }
!     // if no policy command is found this is an error if they use any 
!     // non advanced functions or a lot of functions
      if(!hasVersion)
      {

Index: cmFileCommand.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmFileCommand.cxx,v
retrieving revision 1.103.2.2
retrieving revision 1.103.2.3
diff -C 2 -d -r1.103.2.2 -r1.103.2.3
*** cmFileCommand.cxx	21 Apr 2008 00:44:51 -0000	1.103.2.2
--- cmFileCommand.cxx	1 May 2008 16:35:39 -0000	1.103.2.3
***************
*** 214,218 ****
    file.close();
    cmSystemTools::SetPermissions(fileName.c_str(), mode);
-   this->Makefile->AddWrittenFile(fileName.c_str());
    return true;
  }
--- 214,217 ----

Index: cmSourceFile.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmSourceFile.cxx,v
retrieving revision 1.47.2.1
retrieving revision 1.47.2.2
diff -C 2 -d -r1.47.2.1 -r1.47.2.2
*** cmSourceFile.cxx	2 Apr 2008 13:16:07 -0000	1.47.2.1
--- cmSourceFile.cxx	1 May 2008 16:35:40 -0000	1.47.2.2
***************
*** 47,54 ****
  const char* cmSourceFile::GetLanguage()
  {
!   // Compute the final location of the file if necessary.
!   if(this->FullPath.empty())
      {
!     this->GetFullPath();
      }
  
--- 47,72 ----
  const char* cmSourceFile::GetLanguage()
  {
!   // If the language was set explicitly by the user then use it.
!   if(const char* lang = this->GetProperty("LANGUAGE"))
      {
!     return lang;
!     }
! 
!   // Perform computation needed to get the language if necessary.
!   if(this->FullPath.empty() && this->Language.empty())
!     {
!     if(this->Location.ExtensionIsAmbiguous())
!       {
!       // Finalize the file location to get the extension and set the
!       // language.
!       this->GetFullPath();
!       }
!     else
!       {
!       // Use the known extension to get the language if possible.
!       std::string ext =
!         cmSystemTools::GetFilenameLastExtension(this->Location.GetName());
!       this->CheckLanguage(ext);
!       }
      }
  
***************
*** 168,174 ****
      }
  
    cmOStringStream e;
    e << "Cannot find source file \"" << this->Location.GetName() << "\"";
!   e << "\n\nTried extensions";
    for(std::vector<std::string>::const_iterator ext = srcExts.begin();
        ext != srcExts.end(); ++ext)
--- 186,202 ----
      }
  
+   // If the user provided a full path, trust it.  If the file is not
+   // there the native tool will complain at build time.
+   if(!this->Location.DirectoryIsAmbiguous())
+     {
+     this->FullPath = this->Location.GetDirectory();
+     this->FullPath += "/";
+     this->FullPath += this->Location.GetName();
+     return true;
+     }
+ 
    cmOStringStream e;
    e << "Cannot find source file \"" << this->Location.GetName() << "\"";
!   e << ".  Tried extensions";
    for(std::vector<std::string>::const_iterator ext = srcExts.begin();
        ext != srcExts.end(); ++ext)
***************
*** 181,185 ****
      e << " ." << *ext;
      }
!   cmSystemTools::Error(e.str().c_str());
    this->FindFullPathFailed = true;
    return false;
--- 209,213 ----
      e << " ." << *ext;
      }
!   this->Location.GetMakefile()->IssueMessage(cmake::FATAL_ERROR, e.str());
    this->FindFullPathFailed = true;
    return false;
***************
*** 243,248 ****
  
    // Try to identify the source file language from the extension.
    cmGlobalGenerator* gg = mf->GetLocalGenerator()->GetGlobalGenerator();
!   if(const char* l = gg->GetLanguageFromExtension(this->Extension.c_str()))
      {
      this->Language = l;
--- 271,287 ----
  
    // Try to identify the source file language from the extension.
+   if(this->Language.empty())
+     {
+     this->CheckLanguage(this->Extension);
+     }
+ }
+ 
+ //----------------------------------------------------------------------------
+ void cmSourceFile::CheckLanguage(std::string const& ext)
+ {
+   // Try to identify the source file language from the extension.
+   cmMakefile* mf = this->Location.GetMakefile();
    cmGlobalGenerator* gg = mf->GetLocalGenerator()->GetGlobalGenerator();
!   if(const char* l = gg->GetLanguageFromExtension(ext.c_str()))
      {
      this->Language = l;

Index: cmGlobalVisualStudioGenerator.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalVisualStudioGenerator.h,v
retrieving revision 1.7
retrieving revision 1.7.2.1
diff -C 2 -d -r1.7 -r1.7.2.1
*** cmGlobalVisualStudioGenerator.h	15 Feb 2008 16:49:58 -0000	1.7
--- cmGlobalVisualStudioGenerator.h	1 May 2008 16:35:39 -0000	1.7.2.1
***************
*** 64,67 ****
--- 64,70 ----
    virtual void CallVisualStudioMacro(MacroName m,
                                       const char* vsSolutionFile = 0);
+   
+   // return true if target is fortran only
+   bool TargetIsFortranOnly(cmTarget& t);
  
  protected:

Index: cmWriteFileCommand.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmWriteFileCommand.cxx,v
retrieving revision 1.16
retrieving revision 1.16.2.1
diff -C 2 -d -r1.16 -r1.16.2.1
*** cmWriteFileCommand.cxx	23 Jan 2008 15:27:59 -0000	1.16
--- cmWriteFileCommand.cxx	1 May 2008 16:35:40 -0000	1.16.2.1
***************
*** 98,102 ****
    file.close();
    cmSystemTools::SetPermissions(fileName.c_str(), mode);
-   this->Makefile->AddWrittenFile(fileName.c_str());
  
    return true;
--- 98,101 ----

Index: cmGlobalVisualStudio7Generator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalVisualStudio7Generator.cxx,v
retrieving revision 1.99
retrieving revision 1.99.2.1
diff -C 2 -d -r1.99 -r1.99.2.1
*** cmGlobalVisualStudio7Generator.cxx	4 Feb 2008 21:05:00 -0000	1.99
--- cmGlobalVisualStudio7Generator.cxx	1 May 2008 16:35:39 -0000	1.99.2.1
***************
*** 36,40 ****
    mf->AddDefinition("CMAKE_GENERATOR_RC", "rc");
    mf->AddDefinition("CMAKE_GENERATOR_NO_COMPILER_ENV", "1");
!   mf->AddDefinition("CMAKE_GENERATOR_Fortran", "ifort");
  
    this->AddPlatformDefinitions(mf);
--- 36,40 ----
    mf->AddDefinition("CMAKE_GENERATOR_RC", "rc");
    mf->AddDefinition("CMAKE_GENERATOR_NO_COMPILER_ENV", "1");
!   mf->AddDefinition("CMAKE_GENERATOR_FC", "ifort");
  
    this->AddPlatformDefinitions(mf);
***************
*** 483,492 ****
  void cmGlobalVisualStudio7Generator::WriteProject(std::ostream& fout, 
                                 const char* dspname,
!                                const char* dir, cmTarget&)
! {
!   fout << "Project(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"" 
         << dspname << "\", \""
         << this->ConvertToSolutionPath(dir)
!        << "\\" << dspname << ".vcproj\", \"{"
         << this->GetGUID(dspname) << "}\"\nEndProject\n";
  }
--- 483,501 ----
  void cmGlobalVisualStudio7Generator::WriteProject(std::ostream& fout, 
                                 const char* dspname,
!                                const char* dir, cmTarget& target)
! { 
!    // check to see if this is a fortran build
!   const char* ext = ".vcproj";
!   const char* project = "Project(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"";
!   if(this->TargetIsFortranOnly(target))
!     {
!     ext = ".vfproj";
!     project = "Project(\"{6989167D-11E4-40FE-8C1A-2192A86A7E90}\") = \"";
!     }
! 
!   fout << project
         << dspname << "\", \""
         << this->ConvertToSolutionPath(dir)
!        << "\\" << dspname << ext << "\", \"{"
         << this->GetGUID(dspname) << "}\"\nEndProject\n";
  }

Index: cmComputeLinkInformation.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmComputeLinkInformation.cxx,v
retrieving revision 1.24.2.5
retrieving revision 1.24.2.6
diff -C 2 -d -r1.24.2.5 -r1.24.2.6
*** cmComputeLinkInformation.cxx	21 Apr 2008 19:21:57 -0000	1.24.2.5
--- cmComputeLinkInformation.cxx	1 May 2008 16:35:39 -0000	1.24.2.6
***************
*** 512,515 ****
--- 512,516 ----
    cmComputeLinkDepends cld(this->Target, this->Config);
    cld.SetOldLinkDirMode(this->OldLinkDirMode);
+   cld.SetSharedRegex(this->SharedRegexString);
    cmComputeLinkDepends::EntryVector const& linkEntries = cld.Compute();
  
***************
*** 865,869 ****
      {
      std::string reg_shared = reg;
!     reg_shared += this->CreateExtensionRegex(this->SharedLinkExtensions);
  #ifdef CM_COMPUTE_LINK_INFO_DEBUG
    fprintf(stderr, "shared regex [%s]\n", reg_shared.c_str());
--- 866,872 ----
      {
      std::string reg_shared = reg;
!     this->SharedRegexString =
!       this->CreateExtensionRegex(this->SharedLinkExtensions);
!     reg_shared += this->SharedRegexString;
  #ifdef CM_COMPUTE_LINK_INFO_DEBUG
    fprintf(stderr, "shared regex [%s]\n", reg_shared.c_str());

Index: cmGlobalVisualStudio71Generator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalVisualStudio71Generator.cxx,v
retrieving revision 1.48
retrieving revision 1.48.2.1
diff -C 2 -d -r1.48 -r1.48.2.1
*** cmGlobalVisualStudio71Generator.cxx	15 Feb 2008 16:49:58 -0000	1.48
--- cmGlobalVisualStudio71Generator.cxx	1 May 2008 16:35:39 -0000	1.48.2.1
***************
*** 154,161 ****
                                                cmTarget& t)
  {
!   fout << "Project(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"" 
         << dspname << "\", \""
         << this->ConvertToSolutionPath(dir)
!        << "\\" << dspname << ".vcproj\", \"{"
         << this->GetGUID(dspname) << "}\"\n";
    fout << "\tProjectSection(ProjectDependencies) = postProject\n";
--- 154,170 ----
                                                cmTarget& t)
  {
!   // check to see if this is a fortran build
!   const char* ext = ".vcproj";
!   const char* project = "Project(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"";
!   if(this->TargetIsFortranOnly(t))
!     {
!     ext = ".vfproj"; 
!     project = "Project(\"{6989167D-11E4-40FE-8C1A-2192A86A7E90}\") = \"";
!     }
!   
!   fout << project
         << dspname << "\", \""
         << this->ConvertToSolutionPath(dir)
!        << "\\" << dspname << ext << "\", \"{"
         << this->GetGUID(dspname) << "}\"\n";
    fout << "\tProjectSection(ProjectDependencies) = postProject\n";

Index: cmComputeLinkDepends.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmComputeLinkDepends.cxx,v
retrieving revision 1.12.2.3
retrieving revision 1.12.2.4
diff -C 2 -d -r1.12.2.3 -r1.12.2.4
*** cmComputeLinkDepends.cxx	23 Apr 2008 12:50:37 -0000	1.12.2.3
--- cmComputeLinkDepends.cxx	1 May 2008 16:35:39 -0000	1.12.2.4
***************
*** 25,28 ****
--- 25,29 ----
  
  #include <cmsys/stl/algorithm>
+ #include <cmsys/RegularExpression.hxx>
  
  #include <assert.h>
***************
*** 199,202 ****
--- 200,209 ----
  
  //----------------------------------------------------------------------------
+ void cmComputeLinkDepends::SetSharedRegex(std::string const& regex)
+ {
+   this->SharedRegexString = regex;
+ }
+ 
+ //----------------------------------------------------------------------------
  std::vector<cmComputeLinkDepends::LinkEntry> const&
  cmComputeLinkDepends::Compute()
***************
*** 875,878 ****
--- 882,888 ----
  void cmComputeLinkDepends::PreserveOriginalEntries()
  {
+   // Regular expression to match shared libraries.
+   cmsys::RegularExpression shared_lib(this->SharedRegexString.c_str());
+ 
    // Skip the part of the input sequence that already appears in the
    // output.
***************
*** 883,887 ****
      {
      cmTarget* tgt = this->EntryList[*in].Target;
!     if(tgt && tgt->GetType() != cmTarget::STATIC_LIBRARY)
        {
        // Skip input items known to not be static libraries.
--- 893,898 ----
      {
      cmTarget* tgt = this->EntryList[*in].Target;
!     if((tgt && tgt->GetType() != cmTarget::STATIC_LIBRARY) ||
!        (!tgt && shared_lib.find(this->EntryList[*in].Item)))
        {
        // Skip input items known to not be static libraries.
***************
*** 906,910 ****
      {
      cmTarget* tgt = this->EntryList[*in].Target;
!     if(tgt && tgt->GetType() != cmTarget::STATIC_LIBRARY)
        {
        // Skip input items known to not be static libraries.
--- 917,922 ----
      {
      cmTarget* tgt = this->EntryList[*in].Target;
!     if((tgt && tgt->GetType() != cmTarget::STATIC_LIBRARY) ||
!        (!tgt && shared_lib.find(this->EntryList[*in].Item)))
        {
        // Skip input items known to not be static libraries.

Index: cmMakefile.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmMakefile.h,v
retrieving revision 1.230.2.1
retrieving revision 1.230.2.2
diff -C 2 -d -r1.230.2.1 -r1.230.2.2
*** cmMakefile.h	31 Mar 2008 21:57:41 -0000	1.230.2.1
--- cmMakefile.h	1 May 2008 16:35:40 -0000	1.230.2.2
***************
*** 95,110 ****
  
    /**
-    * Add file to the written file list. These file should not be in the list
-    * of dependencies because they cause infinite loops.
-    */
-   void AddWrittenFile(const char* file);
-   bool HasWrittenFile(const char* file);
- 
-   /**
-    * Check if there are any infinite loops
-    */
-   bool CheckInfiniteLoops();
-   
-   /**
     * Try running cmake and building a file. This is used for dynalically
     * loaded commands, not as part of the usual build process.
--- 95,98 ----

Index: cmAuxSourceDirectoryCommand.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmAuxSourceDirectoryCommand.cxx,v
retrieving revision 1.26
retrieving revision 1.26.2.1
diff -C 2 -d -r1.26 -r1.26.2.1
*** cmAuxSourceDirectoryCommand.cxx	23 Jan 2008 15:27:59 -0000	1.26
--- cmAuxSourceDirectoryCommand.cxx	1 May 2008 16:35:39 -0000	1.26.2.1
***************
*** 34,38 ****
    this->Makefile->AddExtraDirectory(templateDirectory.c_str());
    std::string tdir;
!   if(!cmSystemTools::FileExists(templateDirectory.c_str()))
      {
      tdir = this->Makefile->GetCurrentDirectory();
--- 34,38 ----
    this->Makefile->AddExtraDirectory(templateDirectory.c_str());
    std::string tdir;
!   if(!cmSystemTools::FileIsFullPath(templateDirectory.c_str()))
      {
      tdir = this->Makefile->GetCurrentDirectory();

Index: cmLocalUnixMakefileGenerator3.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmLocalUnixMakefileGenerator3.cxx,v
retrieving revision 1.240.2.4
retrieving revision 1.240.2.5
diff -C 2 -d -r1.240.2.4 -r1.240.2.5
*** cmLocalUnixMakefileGenerator3.cxx	10 Apr 2008 16:43:50 -0000	1.240.2.4
--- cmLocalUnixMakefileGenerator3.cxx	1 May 2008 16:35:39 -0000	1.240.2.5
***************
*** 1020,1023 ****
--- 1020,1036 ----
          cmd = "./" + cmd;
          }
+       if(this->WatcomWMake &&
+          cmSystemTools::FileIsFullPath(cmd.c_str()) &&
+          cmd.find(" ") != cmd.npos)
+         {
+         // On Watcom WMake use the windows short path for the command
+         // name.  This is needed to avoid funny quoting problems on
+         // lines with shell redirection operators.
+         std::string scmd;
+         if(cmSystemTools::GetShortPath(cmd.c_str(), scmd))
+           {
+           cmd = scmd;
+           }
+         }
        cmd = this->Convert(cmd.c_str(),NONE,SHELL);
        for(unsigned int j=1; j < commandLine.size(); ++j)

Index: cmExportLibraryDependencies.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmExportLibraryDependencies.cxx,v
retrieving revision 1.22
retrieving revision 1.22.2.1
diff -C 2 -d -r1.22 -r1.22.2.1
*** cmExportLibraryDependencies.cxx	20 Feb 2008 18:36:38 -0000	1.22
--- cmExportLibraryDependencies.cxx	1 May 2008 16:35:39 -0000	1.22.2.1
***************
*** 20,23 ****
--- 20,24 ----
  #include "cmGeneratedFileStream.h"
  #include "cmake.h"
+ #include "cmVersion.h"
  
  #include <cmsys/auto_ptr.hxx>
***************
*** 173,176 ****
--- 174,178 ----
    const char* vertest =
      "\"${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}\" GREATER 2.4";
+   fout << "# Generated by CMake " <<  cmVersion::GetCMakeVersion() << "\n\n";
    fout << "IF(" << vertest << ")\n";
    fout << "  # Information for CMake 2.6 and above.\n";

Index: cmFileCommand.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmFileCommand.h,v
retrieving revision 1.35.2.1
retrieving revision 1.35.2.2
diff -C 2 -d -r1.35.2.1 -r1.35.2.2
*** cmFileCommand.h	21 Apr 2008 00:44:51 -0000	1.35.2.1
--- cmFileCommand.h	1 May 2008 16:35:39 -0000	1.35.2.2
***************
*** 91,98 ****
        "APPEND will write a message into a file same as WRITE, except "
        "it will append it to the end of the file\n"
-       "NOTE: When using file WRITE and file APPEND, the produced file "
-       "cannot be used as an input to CMake (configure_file, source file ...) "
-       "because it will lead to an infinite loop. Use configure_file if you "
-       "want to generate input files to CMake.\n"
        "READ will read the content of a file and store it into the "
        "variable. It will start at the given offset and read up to numBytes. "
--- 91,94 ----



More information about the Cmake-commits mailing list