Sfoglia il codice sorgente

Merge topic 'vs-slnx' into release-4.2

70ed720232 VS: Add SLNX default startup project

Acked-by: Kitware Robot <[email protected]>
Merge-request: !11420
Brad King 1 mese fa
parent
commit
38e86c8ea4
24 ha cambiato i file con 27 aggiunte e 24 eliminazioni
  1. 3 0
      Source/cmVSSolution.cxx
  2. 1 1
      Tests/RunCMake/VSSolution/AddPackageToDefault-check-slnx.cmake
  3. 1 1
      Tests/RunCMake/VSSolution/CMP0143-NEW-check-slnx.cmake
  4. 1 1
      Tests/RunCMake/VSSolution/CMP0143-OLD-check-slnx.cmake
  5. 1 1
      Tests/RunCMake/VSSolution/CMP0143-WARN-check-slnx.cmake
  6. 1 1
      Tests/RunCMake/VSSolution/DeployEnabled-check-slnx.cmake
  7. 1 1
      Tests/RunCMake/VSSolution/MorePost-check-slnx.cmake
  8. 1 1
      Tests/RunCMake/VSSolution/MorePre-check-slnx.cmake
  9. 1 1
      Tests/RunCMake/VSSolution/OnePost-check-slnx.cmake
  10. 1 1
      Tests/RunCMake/VSSolution/OnePre-check-slnx.cmake
  11. 1 1
      Tests/RunCMake/VSSolution/Override1-check-slnx.cmake
  12. 1 1
      Tests/RunCMake/VSSolution/Override2-check-slnx.cmake
  13. 1 1
      Tests/RunCMake/VSSolution/Override3-check-slnx.cmake
  14. 1 1
      Tests/RunCMake/VSSolution/PrePost-check-slnx.cmake
  15. 2 2
      Tests/RunCMake/VSSolution/SolutionItems-check-slnx.cmake
  16. 1 1
      Tests/RunCMake/VSSolution/StartupProject-check-slnx.cmake
  17. 1 1
      Tests/RunCMake/VSSolution/StartupProjectMissing-check-slnx.cmake
  18. 1 1
      Tests/RunCMake/VSSolution/StartupProjectUseFolders-check-slnx.cmake
  19. 1 1
      Tests/RunCMake/VsDotnetSdk/VsDotnetSdkTargetPlatform-check-slnx.cmake
  20. 1 1
      Tests/RunCMake/include_external_msproject/AutoType-check-slnx.cmake
  21. 1 1
      Tests/RunCMake/include_external_msproject/CustomConfig-check-slnx.cmake
  22. 1 1
      Tests/RunCMake/include_external_msproject/CustomGuid-check-slnx.cmake
  23. 1 1
      Tests/RunCMake/include_external_msproject/CustomGuidTypePlatform-check-slnx.cmake
  24. 1 1
      Tests/RunCMake/include_external_msproject/CustomTypePlatform-check-slnx.cmake

+ 3 - 0
Source/cmVSSolution.cxx

@@ -312,6 +312,9 @@ void WriteSlnxProject(cmXMLElement& xmlParent, Solution const& solution,
   cmXMLElement xmlProject(xmlParent, "Project");
   xmlProject.Attribute("Path", project.Path);
   xmlProject.Attribute("Id", cmSystemTools::LowerCase(project.Id));
+  if (project.Name == solution.StartupProject) {
+    xmlProject.Attribute("DefaultStartup", "true");
+  }
   for (Solution::Project const* d : project.BuildDependencies) {
     cmXMLElement(xmlProject, "BuildDependency").Attribute("Project", d->Path);
   }

+ 1 - 1
Tests/RunCMake/VSSolution/AddPackageToDefault-check-slnx.cmake

@@ -8,7 +8,7 @@ RunCMake_check_slnx("${RunCMake_TEST_BINARY_DIR}/AddPackageToDefault.slnx" [[
     <BuildType Name="RelWithDebInfo"/>
     <Platform Name="[^"]+"/>
   </Configurations>
-  <Project Path="ALL_BUILD\.vcxproj" Id="[0-9a-f-]+">
+  <Project Path="ALL_BUILD\.vcxproj" Id="[0-9a-f-]+" DefaultStartup="true">
     <BuildDependency Project="ZERO_CHECK\.vcxproj"/>
   </Project>
   <Project Path="PACKAGE.vcxproj" Id="[0-9a-f-]+">

+ 1 - 1
Tests/RunCMake/VSSolution/CMP0143-NEW-check-slnx.cmake

@@ -16,7 +16,7 @@ RunCMake_check_slnx("${RunCMake_TEST_BINARY_DIR}/CMP0143-NEW.slnx" [[
     <Build Solution="RelWithDebInfo\|\*" Project="false"/>
   </Project>
   <Folder Name="/CMakePredefinedTargets/">
-    <Project Path="ALL_BUILD.vcxproj" Id="[0-9a-f-]+">
+    <Project Path="ALL_BUILD.vcxproj" Id="[0-9a-f-]+" DefaultStartup="true">
       <BuildDependency Project="ZERO_CHECK.vcxproj"/>
       <Build Solution="Debug\|\*" Project="false"/>
       <Build Solution="Release\|\*" Project="false"/>

+ 1 - 1
Tests/RunCMake/VSSolution/CMP0143-OLD-check-slnx.cmake

@@ -8,7 +8,7 @@ RunCMake_check_slnx("${RunCMake_TEST_BINARY_DIR}/CMP0143-OLD.slnx" [[
     <BuildType Name="RelWithDebInfo"/>
     <Platform Name="[^"]+"/>
   </Configurations>
-  <Project Path="ALL_BUILD\.vcxproj" Id="[0-9a-f-]+">
+  <Project Path="ALL_BUILD\.vcxproj" Id="[0-9a-f-]+" DefaultStartup="true">
     <BuildDependency Project="ZERO_CHECK\.vcxproj"/>
     <Build Solution="Debug\|\*" Project="false"/>
     <Build Solution="Release\|\*" Project="false"/>

+ 1 - 1
Tests/RunCMake/VSSolution/CMP0143-WARN-check-slnx.cmake

@@ -8,7 +8,7 @@ RunCMake_check_slnx("${RunCMake_TEST_BINARY_DIR}/CMP0143-WARN.slnx" [[
     <BuildType Name="RelWithDebInfo"/>
     <Platform Name="[^"]+"/>
   </Configurations>
-  <Project Path="ALL_BUILD\.vcxproj" Id="[0-9a-f-]+">
+  <Project Path="ALL_BUILD\.vcxproj" Id="[0-9a-f-]+" DefaultStartup="true">
     <BuildDependency Project="ZERO_CHECK\.vcxproj"/>
     <Build Solution="Debug\|\*" Project="false"/>
     <Build Solution="Release\|\*" Project="false"/>

+ 1 - 1
Tests/RunCMake/VSSolution/DeployEnabled-check-slnx.cmake

@@ -8,7 +8,7 @@ RunCMake_check_slnx("${RunCMake_TEST_BINARY_DIR}/DeployEnabled.slnx" [[
     <BuildType Name="RelWithDebInfo"/>
     <Platform Name="[^"]+"/>
   </Configurations>
-  <Project Path="ALL_BUILD\.vcxproj" Id="[0-9a-f-]+">
+  <Project Path="ALL_BUILD\.vcxproj" Id="[0-9a-f-]+" DefaultStartup="true">
     <BuildDependency Project="ZERO_CHECK\.vcxproj"/>
     <BuildDependency Project="foo\.vcxproj"/>
     <Build Solution="Debug\|\*" Project="false"/>

+ 1 - 1
Tests/RunCMake/VSSolution/MorePost-check-slnx.cmake

@@ -8,7 +8,7 @@ RunCMake_check_slnx("${RunCMake_TEST_BINARY_DIR}/MorePost.slnx" [[
     <BuildType Name="RelWithDebInfo"/>
     <Platform Name="[^"]+"/>
   </Configurations>
-  <Project Path="ALL_BUILD\.vcxproj" Id="[0-9a-f-]+">
+  <Project Path="ALL_BUILD\.vcxproj" Id="[0-9a-f-]+" DefaultStartup="true">
     <BuildDependency Project="ZERO_CHECK\.vcxproj"/>
     <Build Solution="Debug\|\*" Project="false"/>
     <Build Solution="Release\|\*" Project="false"/>

+ 1 - 1
Tests/RunCMake/VSSolution/MorePre-check-slnx.cmake

@@ -8,7 +8,7 @@ RunCMake_check_slnx("${RunCMake_TEST_BINARY_DIR}/MorePre.slnx" [[
     <BuildType Name="RelWithDebInfo"/>
     <Platform Name="[^"]+"/>
   </Configurations>
-  <Project Path="ALL_BUILD\.vcxproj" Id="[0-9a-f-]+">
+  <Project Path="ALL_BUILD\.vcxproj" Id="[0-9a-f-]+" DefaultStartup="true">
     <BuildDependency Project="ZERO_CHECK\.vcxproj"/>
     <Build Solution="Debug\|\*" Project="false"/>
     <Build Solution="Release\|\*" Project="false"/>

+ 1 - 1
Tests/RunCMake/VSSolution/OnePost-check-slnx.cmake

@@ -8,7 +8,7 @@ RunCMake_check_slnx("${RunCMake_TEST_BINARY_DIR}/OnePost.slnx" [[
     <BuildType Name="RelWithDebInfo"/>
     <Platform Name="[^"]+"/>
   </Configurations>
-  <Project Path="ALL_BUILD\.vcxproj" Id="[0-9a-f-]+">
+  <Project Path="ALL_BUILD\.vcxproj" Id="[0-9a-f-]+" DefaultStartup="true">
     <BuildDependency Project="ZERO_CHECK\.vcxproj"/>
     <Build Solution="Debug\|\*" Project="false"/>
     <Build Solution="Release\|\*" Project="false"/>

+ 1 - 1
Tests/RunCMake/VSSolution/OnePre-check-slnx.cmake

@@ -8,7 +8,7 @@ RunCMake_check_slnx("${RunCMake_TEST_BINARY_DIR}/OnePre.slnx" [[
     <BuildType Name="RelWithDebInfo"/>
     <Platform Name="[^"]+"/>
   </Configurations>
-  <Project Path="ALL_BUILD\.vcxproj" Id="[0-9a-f-]+">
+  <Project Path="ALL_BUILD\.vcxproj" Id="[0-9a-f-]+" DefaultStartup="true">
     <BuildDependency Project="ZERO_CHECK\.vcxproj"/>
     <Build Solution="Debug\|\*" Project="false"/>
     <Build Solution="Release\|\*" Project="false"/>

+ 1 - 1
Tests/RunCMake/VSSolution/Override1-check-slnx.cmake

@@ -8,7 +8,7 @@ RunCMake_check_slnx("${RunCMake_TEST_BINARY_DIR}/Override1.slnx" [[
     <BuildType Name="RelWithDebInfo"/>
     <Platform Name="[^"]+"/>
   </Configurations>
-  <Project Path="ALL_BUILD\.vcxproj" Id="[0-9a-f-]+">
+  <Project Path="ALL_BUILD\.vcxproj" Id="[0-9a-f-]+" DefaultStartup="true">
     <BuildDependency Project="ZERO_CHECK\.vcxproj"/>
     <Build Solution="Debug\|\*" Project="false"/>
     <Build Solution="Release\|\*" Project="false"/>

+ 1 - 1
Tests/RunCMake/VSSolution/Override2-check-slnx.cmake

@@ -8,7 +8,7 @@ RunCMake_check_slnx("${RunCMake_TEST_BINARY_DIR}/Override2.slnx" [[
     <BuildType Name="RelWithDebInfo"/>
     <Platform Name="[^"]+"/>
   </Configurations>
-  <Project Path="ALL_BUILD\.vcxproj" Id="[0-9a-f-]+">
+  <Project Path="ALL_BUILD\.vcxproj" Id="[0-9a-f-]+" DefaultStartup="true">
     <BuildDependency Project="ZERO_CHECK\.vcxproj"/>
     <Build Solution="Debug\|\*" Project="false"/>
     <Build Solution="Release\|\*" Project="false"/>

+ 1 - 1
Tests/RunCMake/VSSolution/Override3-check-slnx.cmake

@@ -8,7 +8,7 @@ RunCMake_check_slnx("${RunCMake_TEST_BINARY_DIR}/Override3.slnx" [[
     <BuildType Name="RelWithDebInfo"/>
     <Platform Name="[^"]+"/>
   </Configurations>
-  <Project Path="ALL_BUILD\.vcxproj" Id="[0-9a-f-]+">
+  <Project Path="ALL_BUILD\.vcxproj" Id="[0-9a-f-]+" DefaultStartup="true">
     <BuildDependency Project="ZERO_CHECK\.vcxproj"/>
     <Build Solution="Debug\|\*" Project="false"/>
     <Build Solution="Release\|\*" Project="false"/>

+ 1 - 1
Tests/RunCMake/VSSolution/PrePost-check-slnx.cmake

@@ -8,7 +8,7 @@ RunCMake_check_slnx("${RunCMake_TEST_BINARY_DIR}/PrePost.slnx" [[
     <BuildType Name="RelWithDebInfo"/>
     <Platform Name="[^"]+"/>
   </Configurations>
-  <Project Path="ALL_BUILD\.vcxproj" Id="[0-9a-f-]+">
+  <Project Path="ALL_BUILD\.vcxproj" Id="[0-9a-f-]+" DefaultStartup="true">
     <BuildDependency Project="ZERO_CHECK\.vcxproj"/>
     <Build Solution="Debug\|\*" Project="false"/>
     <Build Solution="Release\|\*" Project="false"/>

+ 2 - 2
Tests/RunCMake/VSSolution/SolutionItems-check-slnx.cmake

@@ -8,7 +8,7 @@ RunCMake_check_slnx("${RunCMake_TEST_BINARY_DIR}/SolutionItems.slnx" [[
     <BuildType Name="RelWithDebInfo"/>
     <Platform Name="[^"]+"/>
   </Configurations>
-  <Project Path="ALL_BUILD\.vcxproj" Id="[0-9a-f-]+">
+  <Project Path="ALL_BUILD\.vcxproj" Id="[0-9a-f-]+" DefaultStartup="true">
     <BuildDependency Project="ZERO_CHECK\.vcxproj"/>
     <Build Solution="Debug\|\*" Project="false"/>
     <Build Solution="Release\|\*" Project="false"/>
@@ -38,7 +38,7 @@ RunCMake_check_slnx("${RunCMake_TEST_BINARY_DIR}/SolutionItems/SolutionItemsSubp
     <BuildType Name="RelWithDebInfo"/>
     <Platform Name="[^"]+"/>
   </Configurations>
-  <Project Path="ALL_BUILD\.vcxproj" Id="[0-9a-f-]+">
+  <Project Path="ALL_BUILD\.vcxproj" Id="[0-9a-f-]+" DefaultStartup="true">
     <BuildDependency Project="\.\./ZERO_CHECK\.vcxproj"/>
     <Build Solution="Debug\|\*" Project="false"/>
     <Build Solution="Release\|\*" Project="false"/>

+ 1 - 1
Tests/RunCMake/VSSolution/StartupProject-check-slnx.cmake

@@ -15,7 +15,7 @@ RunCMake_check_slnx("${RunCMake_TEST_BINARY_DIR}/StartupProject.slnx" [[
     <Build Solution="MinSizeRel\|\*" Project="false"/>
     <Build Solution="RelWithDebInfo\|\*" Project="false"/>
   </Project>
-  <Project Path="TestStartup\.vcxproj" Id="[0-9a-f-]+">
+  <Project Path="TestStartup\.vcxproj" Id="[0-9a-f-]+" DefaultStartup="true">
     <BuildDependency Project="ZERO_CHECK\.vcxproj"/>
     <Build Solution="Debug\|\*" Project="false"/>
     <Build Solution="Release\|\*" Project="false"/>

+ 1 - 1
Tests/RunCMake/VSSolution/StartupProjectMissing-check-slnx.cmake

@@ -8,7 +8,7 @@ RunCMake_check_slnx("${RunCMake_TEST_BINARY_DIR}/StartupProjectMissing.slnx" [[
     <BuildType Name="RelWithDebInfo"/>
     <Platform Name="[^"]+"/>
   </Configurations>
-  <Project Path="ALL_BUILD\.vcxproj" Id="[0-9a-f-]+">
+  <Project Path="ALL_BUILD\.vcxproj" Id="[0-9a-f-]+" DefaultStartup="true">
     <BuildDependency Project="ZERO_CHECK\.vcxproj"/>
     <Build Solution="Debug\|\*" Project="false"/>
     <Build Solution="Release\|\*" Project="false"/>

+ 1 - 1
Tests/RunCMake/VSSolution/StartupProjectUseFolders-check-slnx.cmake

@@ -8,7 +8,7 @@ RunCMake_check_slnx("${RunCMake_TEST_BINARY_DIR}/StartupProjectUseFolders.slnx"
     <BuildType Name="RelWithDebInfo"/>
     <Platform Name="[^"]+"/>
   </Configurations>
-  <Project Path="TestStartup\.vcxproj" Id="[0-9a-f-]+">
+  <Project Path="TestStartup\.vcxproj" Id="[0-9a-f-]+" DefaultStartup="true">
     <BuildDependency Project="ZERO_CHECK.vcxproj"/>
     <Build Solution="Debug\|\*" Project="false"/>
     <Build Solution="Release\|\*" Project="false"/>

+ 1 - 1
Tests/RunCMake/VsDotnetSdk/VsDotnetSdkTargetPlatform-check-slnx.cmake

@@ -8,7 +8,7 @@ RunCMake_check_slnx("${RunCMake_TEST_BINARY_DIR}/VsDotnetSdkTargetPlatform.slnx"
     <BuildType Name="RelWithDebInfo"/>
     <Platform Name="[^"]+"/>
   </Configurations>
-  <Project Path="ALL_BUILD\.vcxproj" Id="[0-9a-f-]+">
+  <Project Path="ALL_BUILD\.vcxproj" Id="[0-9a-f-]+" DefaultStartup="true">
     <BuildDependency Project="ZERO_CHECK\.vcxproj"/>
     <BuildDependency Project="foo\.csproj"/>
     <Build Solution="Debug\|\*" Project="false"/>

+ 1 - 1
Tests/RunCMake/include_external_msproject/AutoType-check-slnx.cmake

@@ -8,7 +8,7 @@ RunCMake_check_slnx("${RunCMake_TEST_BINARY_DIR}/AutoType.slnx" [[
     <BuildType Name="RelWithDebInfo"/>
     <Platform Name="[^"]+"/>
   </Configurations>
-  <Project Path="ALL_BUILD\.vcxproj" Id="[0-9a-f-]+">
+  <Project Path="ALL_BUILD\.vcxproj" Id="[0-9a-f-]+" DefaultStartup="true">
     <BuildDependency Project="ZERO_CHECK\.vcxproj"/>
     <BuildDependency Project="external\.csproj"/>
     <BuildDependency Project="external\.dbproj"/>

+ 1 - 1
Tests/RunCMake/include_external_msproject/CustomConfig-check-slnx.cmake

@@ -8,7 +8,7 @@ RunCMake_check_slnx("${RunCMake_TEST_BINARY_DIR}/CustomConfig.slnx" [[
     <BuildType Name="RelWithDebInfo"/>
     <Platform Name="[^"]+"/>
   </Configurations>
-  <Project Path="ALL_BUILD\.vcxproj" Id="[0-9a-f-]+">
+  <Project Path="ALL_BUILD\.vcxproj" Id="[0-9a-f-]+" DefaultStartup="true">
     <BuildDependency Project="ZERO_CHECK\.vcxproj"/>
     <BuildDependency Project="external.project"/>
     <Build Solution="Debug\|\*" Project="false"/>

+ 1 - 1
Tests/RunCMake/include_external_msproject/CustomGuid-check-slnx.cmake

@@ -8,7 +8,7 @@ RunCMake_check_slnx("${RunCMake_TEST_BINARY_DIR}/CustomGuid.slnx" [[
     <BuildType Name="RelWithDebInfo"/>
     <Platform Name="[^"]+"/>
   </Configurations>
-  <Project Path="ALL_BUILD\.vcxproj" Id="[0-9a-f-]+">
+  <Project Path="ALL_BUILD\.vcxproj" Id="[0-9a-f-]+" DefaultStartup="true">
     <BuildDependency Project="ZERO_CHECK\.vcxproj"/>
     <BuildDependency Project="external.project"/>
     <Build Solution="Debug\|\*" Project="false"/>

+ 1 - 1
Tests/RunCMake/include_external_msproject/CustomGuidTypePlatform-check-slnx.cmake

@@ -8,7 +8,7 @@ RunCMake_check_slnx("${RunCMake_TEST_BINARY_DIR}/CustomGuidTypePlatform.slnx" [[
     <BuildType Name="RelWithDebInfo"/>
     <Platform Name="[^"]+"/>
   </Configurations>
-  <Project Path="ALL_BUILD\.vcxproj" Id="[0-9a-f-]+">
+  <Project Path="ALL_BUILD\.vcxproj" Id="[0-9a-f-]+" DefaultStartup="true">
     <BuildDependency Project="ZERO_CHECK\.vcxproj"/>
     <BuildDependency Project="external.project"/>
     <Build Solution="Debug\|\*" Project="false"/>

+ 1 - 1
Tests/RunCMake/include_external_msproject/CustomTypePlatform-check-slnx.cmake

@@ -8,7 +8,7 @@ RunCMake_check_slnx("${RunCMake_TEST_BINARY_DIR}/CustomTypePlatform.slnx" [[
     <BuildType Name="RelWithDebInfo"/>
     <Platform Name="[^"]+"/>
   </Configurations>
-  <Project Path="ALL_BUILD\.vcxproj" Id="[0-9a-f-]+">
+  <Project Path="ALL_BUILD\.vcxproj" Id="[0-9a-f-]+" DefaultStartup="true">
     <BuildDependency Project="ZERO_CHECK\.vcxproj"/>
     <BuildDependency Project="external.project"/>
     <Build Solution="Debug\|\*" Project="false"/>