Browse Source

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 năm trước cách đây
mục cha
commit
6571f4655a
1 tập tin đã thay đổi với 10 bổ sung0 xóa
  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;
 }
 
 //----------------------------------------------------------------------------