diff options
Diffstat (limited to 'Source/cmGlobalVisualStudio71Generator.cxx')
-rw-r--r-- | Source/cmGlobalVisualStudio71Generator.cxx | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/Source/cmGlobalVisualStudio71Generator.cxx b/Source/cmGlobalVisualStudio71Generator.cxx index f6796a5..7b51fdf 100644 --- a/Source/cmGlobalVisualStudio71Generator.cxx +++ b/Source/cmGlobalVisualStudio71Generator.cxx @@ -97,14 +97,31 @@ void cmGlobalVisualStudio71Generator OrderedTargetDependSet orderedProjectTargets( projectTargets, this->GetStartupProjectName(root)); - this->WriteTargetsToSolution(fout, root, orderedProjectTargets); + // Generate the targets specification to a string. We will put this in + // the actual .sln file later. As a side effect, this method also + // populates the set of folders. + std::ostringstream targetsSlnString; + this->WriteTargetsToSolution(targetsSlnString, root, orderedProjectTargets); + + // VS 7 does not support folders specified first. + if (this->GetVersion() <= VS71) + { + fout << targetsSlnString.str(); + } + // Generate folder specification. bool useFolderProperty = this->UseFolderProperty(); if (useFolderProperty) { this->WriteFolders(fout); } + // Now write the actual target specification content. + if (this->GetVersion() > VS71) + { + fout << targetsSlnString.str(); + } + // Write out the configurations information for the solution fout << "Global\n"; // Write out the configurations for the solution |