summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalVisualStudio7Generator.cxx
diff options
context:
space:
mode:
authorDavid Cole <david.cole@kitware.com>2012-10-24 18:27:06 (GMT)
committerDavid Cole <david.cole@kitware.com>2012-10-24 18:27:06 (GMT)
commitd7de6410dd462b2f83e77f78575b3f9112d154d0 (patch)
tree63590436b01c503948cde8d50e1a311871f0eba1 /Source/cmGlobalVisualStudio7Generator.cxx
parentf551fa62450379b41b510054948e097582538357 (diff)
downloadCMake-d7de6410dd462b2f83e77f78575b3f9112d154d0.zip
CMake-d7de6410dd462b2f83e77f78575b3f9112d154d0.tar.gz
CMake-d7de6410dd462b2f83e77f78575b3f9112d154d0.tar.bz2
VS: Avoid empty, unreferenced solution folders... (#13571)
...in generated sub-directory sln files. Thanks to rlandert for the bug report and proposed patch. The method WriteTargetsToSolution gets called possibly multiple times, once per sln file, (-> once per "project" command). Before accumulating folder names in VisualStudioFolders, clear it first, so it doesn't have stale entries in it from the previous sln file.
Diffstat (limited to 'Source/cmGlobalVisualStudio7Generator.cxx')
-rw-r--r--Source/cmGlobalVisualStudio7Generator.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx
index b6eea5d..15ef738 100644
--- a/Source/cmGlobalVisualStudio7Generator.cxx
+++ b/Source/cmGlobalVisualStudio7Generator.cxx
@@ -268,6 +268,8 @@ void cmGlobalVisualStudio7Generator::WriteTargetsToSolution(
cmLocalGenerator* root,
OrderedTargetDependSet const& projectTargets)
{
+ VisualStudioFolders.clear();
+
for(OrderedTargetDependSet::const_iterator tt =
projectTargets.begin(); tt != projectTargets.end(); ++tt)
{