summaryrefslogtreecommitdiffstats
path: root/Source/cmVisualStudio10TargetGenerator.cxx
diff options
context:
space:
mode:
authorDavid Cole <david.cole@kitware.com>2010-05-05 18:30:21 (GMT)
committerDavid Cole <david.cole@kitware.com>2010-05-14 20:57:15 (GMT)
commit7220df021be73cba540c72fcac86e59b84797375 (patch)
treed9701fb79773a63c1f4d11bb04b169b37272351d /Source/cmVisualStudio10TargetGenerator.cxx
parent8dd99db6865fafb737ff2d84bcca3713f0f49b66 (diff)
downloadCMake-7220df021be73cba540c72fcac86e59b84797375.zip
CMake-7220df021be73cba540c72fcac86e59b84797375.tar.gz
CMake-7220df021be73cba540c72fcac86e59b84797375.tar.bz2
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.
Diffstat (limited to 'Source/cmVisualStudio10TargetGenerator.cxx')
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx8
1 files changed, 7 insertions, 1 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index 4a8e161..9f64473 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("</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,