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:
parent
8dd99db686
commit
7220df021b
|
@ -441,6 +441,7 @@ void cmVisualStudio10TargetGenerator::WriteGroups()
|
||||||
path += this->Name;
|
path += this->Name;
|
||||||
path += ".vcxproj.filters";
|
path += ".vcxproj.filters";
|
||||||
cmGeneratedFileStream fout(path.c_str());
|
cmGeneratedFileStream fout(path.c_str());
|
||||||
|
fout.SetCopyIfDifferent(true);
|
||||||
char magic[] = {0xEF,0xBB, 0xBF};
|
char magic[] = {0xEF,0xBB, 0xBF};
|
||||||
fout.write(magic, 3);
|
fout.write(magic, 3);
|
||||||
cmGeneratedFileStream* save = this->BuildFileStream;
|
cmGeneratedFileStream* save = this->BuildFileStream;
|
||||||
|
@ -484,6 +485,11 @@ void cmVisualStudio10TargetGenerator::WriteGroups()
|
||||||
this->WriteString("</Project>\n", 0);
|
this->WriteString("</Project>\n", 0);
|
||||||
// restore stream pointer
|
// restore stream pointer
|
||||||
this->BuildFileStream = save;
|
this->BuildFileStream = save;
|
||||||
|
|
||||||
|
if (fout.Close())
|
||||||
|
{
|
||||||
|
this->GlobalGenerator->FileReplacedDuringGenerate(path);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
Loading…
Reference in New Issue