Fix generation of .filters files for Visual Studio 2010 generator.

Only generate .filters files if they are different than the last time
they were generated. This should prevent the unnecessary reloads
being triggered with Visual Studio 2010 builds.
This commit is contained in:
David Cole 2010-05-05 14:30:21 -04:00
parent 8dd99db686
commit 7220df021b
1 changed files with 7 additions and 1 deletions

View File

@ -441,6 +441,7 @@ void cmVisualStudio10TargetGenerator::WriteGroups()
path += this->Name;
path += ".vcxproj.filters";
cmGeneratedFileStream fout(path.c_str());
fout.SetCopyIfDifferent(true);
char magic[] = {0xEF,0xBB, 0xBF};
fout.write(magic, 3);
cmGeneratedFileStream* save = this->BuildFileStream;
@ -484,9 +485,14 @@ void cmVisualStudio10TargetGenerator::WriteGroups()
this->WriteString("</Project>\n", 0);
// restore stream pointer
this->BuildFileStream = save;
if (fout.Close())
{
this->GlobalGenerator->FileReplacedDuringGenerate(path);
}
}
void
void
cmVisualStudio10TargetGenerator::
WriteGroupSources(const char* name,
std::vector<cmSourceFile*> const& sources,