Merge topic 'vs-slnx' into release-4.2

70ed720232 VS: Add SLNX default startup project

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11420
This commit is contained in:
Brad King
2025-11-15 14:01:30 +00:00
committed by Kitware Robot
24 changed files with 27 additions and 24 deletions

View File

@@ -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);
}

View File

@@ -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-]+">

View File

@@ -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"/>

View File

@@ -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"/>

View File

@@ -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"/>

View File

@@ -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"/>

View File

@@ -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"/>

View File

@@ -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"/>

View File

@@ -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"/>

View File

@@ -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"/>

View File

@@ -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"/>

View File

@@ -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"/>

View File

@@ -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"/>

View File

@@ -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"/>

View File

@@ -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"/>

View File

@@ -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"/>

View File

@@ -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"/>

View File

@@ -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"/>

View File

@@ -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"/>

View File

@@ -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"/>

View File

@@ -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"/>

View File

@@ -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"/>

View File

@@ -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"/>

View File

@@ -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"/>