Răsfoiți Sursa

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.
Brad King 17 ani în urmă
părinte
comite
0d83faf3e3
1 a modificat fișierele cu 4 adăugiri și 4 ștergeri
  1. 4 4
      Source/cmGlobalVisualStudio7Generator.cxx

+ 4 - 4
Source/cmGlobalVisualStudio7Generator.cxx

@@ -730,14 +730,14 @@ 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;
     }
+  if(strcmp(l->GetName(), "ALL_BUILD") == 0)
+    {
+    return true;
+    }
   return strcmp(l->GetName(), r->GetName()) < 0;
 }