瀏覽代碼

Fix Intel Fortran .vfproj files for VS 10

Commit 1be4b6f4 (Order VS local generator Version ivar values
consistently, 2011-11-10) fixed the Version ivar of the VS 10 local
generator by setting it correctly to 10 instead of leaving it at 7.
This broke generation of .vfproj files for the Intel Fortran plugin to
VS 10 by mixing VS 9 and 10 formats together in one file.  Teach the
local generator to pretend the Version is 9 for Intel Fortran targets.
Brad King 14 年之前
父節點
當前提交
6571f4655a
共有 1 個文件被更改,包括 10 次插入0 次删除
  1. 10 0
      Source/cmLocalVisualStudio7Generator.cxx

+ 10 - 0
Source/cmLocalVisualStudio7Generator.cxx

@@ -223,6 +223,14 @@ void cmLocalVisualStudio7Generator
   this->FortranProject =
     static_cast<cmGlobalVisualStudioGenerator*>(this->GlobalGenerator)
     ->TargetIsFortranOnly(target);
+
+  // Intel Fortran for VS10 uses VS9 format ".vfproj" files.
+  VSVersion realVersion = this->Version;
+  if(this->FortranProject && this->Version >= VS10)
+    {
+    this->Version = VS9;
+    }
+
   // add to the list of projects
   std::string pname = lname;
   target.SetProperty("GENERATOR_FILE_NAME",lname);
@@ -250,6 +258,8 @@ void cmLocalVisualStudio7Generator
     {
     this->GlobalGenerator->FileReplacedDuringGenerate(fname);
     }
+
+  this->Version = realVersion;
 }
 
 //----------------------------------------------------------------------------