summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalVisualStudio7Generator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2009-01-21 22:06:57 (GMT)
committerBrad King <brad.king@kitware.com>2009-01-21 22:06:57 (GMT)
commit5b63e31041eb8b0c37c4696f43725a117df80129 (patch)
tree2112736ae09ca80b9e19a5ca622f3cc3f169a554 /Source/cmGlobalVisualStudio7Generator.cxx
parent00ca96ae7c6950ebe8584f0b53ad88dc01a9605e (diff)
downloadCMake-5b63e31041eb8b0c37c4696f43725a117df80129.zip
CMake-5b63e31041eb8b0c37c4696f43725a117df80129.tar.gz
CMake-5b63e31041eb8b0c37c4696f43725a117df80129.tar.bz2
ENH: Make ALL_BUILD always the default project
This teaches the VS IDE generators to write ALL_BUILD into solution files first so that it is always the default active project. Previously it was first only if no target name sorted lexicographically earlier. See issue #8172.
Diffstat (limited to 'Source/cmGlobalVisualStudio7Generator.cxx')
-rw-r--r--Source/cmGlobalVisualStudio7Generator.cxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx
index b18283c..02dc39b 100644
--- a/Source/cmGlobalVisualStudio7Generator.cxx
+++ b/Source/cmGlobalVisualStudio7Generator.cxx
@@ -729,6 +729,15 @@ bool
cmGlobalVisualStudio7Generator::TargetCompare
::operator()(cmTarget const* l, cmTarget const* r)
{
+ // Make sure ALL_BUILD is first so it is the default active project.
+ if(strcmp(l->GetName(), "ALL_BUILD") == 0)
+ {
+ return true;
+ }
+ if(strcmp(r->GetName(), "ALL_BUILD") == 0)
+ {
+ return false;
+ }
return strcmp(l->GetName(), r->GetName()) < 0;
}