summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalVisualStudio71Generator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2009-01-21 21:39:43 (GMT)
committerBrad King <brad.king@kitware.com>2009-01-21 21:39:43 (GMT)
commit00ca96ae7c6950ebe8584f0b53ad88dc01a9605e (patch)
tree21961018fbe71c0b66da73c2c2aabbb4646f3598 /Source/cmGlobalVisualStudio71Generator.cxx
parent36c228814b18ef115a1a72cac4f103691f249569 (diff)
downloadCMake-00ca96ae7c6950ebe8584f0b53ad88dc01a9605e.zip
CMake-00ca96ae7c6950ebe8584f0b53ad88dc01a9605e.tar.gz
CMake-00ca96ae7c6950ebe8584f0b53ad88dc01a9605e.tar.bz2
BUG: Fix VS IDE project order
Our implementation of the feature to pull in dependent targets in VS solution files for subprojects caused the order of project files in the solution to be arbitrary (based on pointer value in the representation). Target ordering in solution files is important to prevent unnecessary changing of the files and because the VS IDE selects the first project listed as the default active target. This change restores lexicographic order by target name.
Diffstat (limited to 'Source/cmGlobalVisualStudio71Generator.cxx')
-rw-r--r--Source/cmGlobalVisualStudio71Generator.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/Source/cmGlobalVisualStudio71Generator.cxx b/Source/cmGlobalVisualStudio71Generator.cxx
index 01ea403..6974b07 100644
--- a/Source/cmGlobalVisualStudio71Generator.cxx
+++ b/Source/cmGlobalVisualStudio71Generator.cxx
@@ -115,7 +115,9 @@ void cmGlobalVisualStudio71Generator
this->GetTargetSets(projectTargets,
originalTargets,
root, generators);
- this->WriteTargetsToSolution(fout, root, projectTargets, originalTargets);
+ OrderedTargetDependSet orderedProjectTargets(projectTargets);
+ this->WriteTargetsToSolution(fout, root, orderedProjectTargets,
+ originalTargets);
// Write out the configurations information for the solution
fout << "Global\n";
// Write out the configurations for the solution
@@ -123,7 +125,7 @@ void cmGlobalVisualStudio71Generator
fout << "\tGlobalSection(" << this->ProjectConfigurationSectionName
<< ") = postSolution\n";
// Write out the configurations for all the targets in the project
- this->WriteTargetConfigurations(fout, root, projectTargets);
+ this->WriteTargetConfigurations(fout, root, orderedProjectTargets);
fout << "\tEndGlobalSection\n";
// Write the footer for the SLN file
this->WriteSLNFooter(fout);