From 7220df021be73cba540c72fcac86e59b84797375 Mon Sep 17 00:00:00 2001 From: David Cole Date: Wed, 5 May 2010 14:30:21 -0400 Subject: [PATCH] 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. --- Source/cmVisualStudio10TargetGenerator.cxx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 4a8e161f3..9f6447317 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -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("\n", 0); // restore stream pointer this->BuildFileStream = save; + + if (fout.Close()) + { + this->GlobalGenerator->FileReplacedDuringGenerate(path); + } } -void +void cmVisualStudio10TargetGenerator:: WriteGroupSources(const char* name, std::vector const& sources,