BUG: Fix ALL_BUILD ordering enforcement

The previous change to make ALL_BUILD come first among targets did not
account for comparing the target name against itself.  This led to an
invalid ordering of the target set.  This change fixes it.
This commit is contained in:
Brad King 2009-01-21 17:24:54 -05:00
parent 5b63e31041
commit 0d83faf3e3
1 changed files with 4 additions and 4 deletions

View File

@ -730,14 +730,14 @@ cmGlobalVisualStudio7Generator::TargetCompare
::operator()(cmTarget const* l, cmTarget const* r) ::operator()(cmTarget const* l, cmTarget const* r)
{ {
// Make sure ALL_BUILD is first so it is the default active project. // 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) if(strcmp(r->GetName(), "ALL_BUILD") == 0)
{ {
return false; return false;
} }
if(strcmp(l->GetName(), "ALL_BUILD") == 0)
{
return true;
}
return strcmp(l->GetName(), r->GetName()) < 0; return strcmp(l->GetName(), r->GetName()) < 0;
} }