mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-26 16:18:43 -05:00
VS: Add SLNX default startup project
At the time of commit e6aa7742b0 (VS: Generate .slnx files for VS 2026,
2025-09-17, v4.2.0-rc1~151^2), the VS 18 Insiders edition did not offer
support for specifying a default startup project in `.slnx` files.
This has since been added, so use it.
Fixes: #27387
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user