소스 검색

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.
Brad King 17 년 전
부모
커밋
5b63e31041
1개의 변경된 파일9개의 추가작업 그리고 0개의 파일을 삭제
  1. 9 0
      Source/cmGlobalVisualStudio7Generator.cxx

+ 9 - 0
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;
 }