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.
This commit is contained in:
Brad King 2011-12-13 16:19:14 -05:00
parent c92ffece80
commit 6571f4655a
1 changed files with 10 additions and 0 deletions

View File

@ -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;
}
//----------------------------------------------------------------------------