diff options
author | David Cole <david.cole@kitware.com> | 2010-05-05 18:30:21 (GMT) |
---|---|---|
committer | David Cole <david.cole@kitware.com> | 2010-05-14 20:57:15 (GMT) |
commit | 7220df021be73cba540c72fcac86e59b84797375 (patch) | |
tree | d9701fb79773a63c1f4d11bb04b169b37272351d /Source/cmVisualStudio10TargetGenerator.cxx | |
parent | 8dd99db6865fafb737ff2d84bcca3713f0f49b66 (diff) | |
download | CMake-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.cxx | 8 |
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, |