From 5b63e31041eb8b0c37c4696f43725a117df80129 Mon Sep 17 00:00:00 2001 From: Brad King Date: Wed, 21 Jan 2009 17:06:57 -0500 Subject: 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. --- Source/cmGlobalVisualStudio7Generator.cxx | 9 +++++++++ 1 file changed, 9 insertions(+) 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; } -- cgit v0.12