MCPcopy Create free account
hub / github.com/Kitware/CMake / WriteSlnxProject

Function WriteSlnxProject

Source/cmVSSolution.cxx:337–372  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

335};
336
337void WriteSlnxProject(cmXMLElement& xmlParent, Solution const& solution,
338 Solution::Project const& project)
339{
340 cmXMLElement xmlProject(xmlParent, "Project");
341 xmlProject.Attribute("Path", project.Path);
342 xmlProject.Attribute("Type", cmSystemTools::LowerCase(project.TypeId));
343 xmlProject.Attribute("Id", cmSystemTools::LowerCase(project.Id));
344 if (project.Name == solution.StartupProject) {
345 xmlProject.Attribute("DefaultStartup", "true");
346 }
347 for (Solution::Project const* d : project.BuildDependencies) {
348 cmXMLElement(xmlProject, "BuildDependency").Attribute("Project", d->Path);
349 }
350 assert(project.Configs.size() == solution.Configs.size());
351 for (std::size_t i = 0; i < solution.Configs.size(); ++i) {
352 if (project.Configs[i].Config != solution.Configs[i]) {
353 cmXMLElement(xmlProject, "BuildType")
354 .Attribute("Solution", cmStrCat(solution.Configs[i], "|*"))
355 .Attribute("Project", project.Configs[i].Config);
356 }
357 if (!project.Configs[i].Build) {
358 cmXMLElement(xmlProject, "Build")
359 .Attribute("Solution", cmStrCat(solution.Configs[i], "|*"))
360 .Attribute("Project", "false");
361 }
362 if (project.Configs[i].Deploy) {
363 cmXMLElement(xmlProject, "Deploy")
364 .Attribute("Solution", cmStrCat(solution.Configs[i], "|*"));
365 }
366 }
367 if (project.Platform != solution.Platform ||
368 NeedExplicitProjectPlatform(project.TypeId)) {
369 cmXMLElement(xmlProject, "Platform")
370 .Attribute("Project", project.Platform);
371 }
372};
373
374void WriteSlnxFolder(cmXMLElement& xmlParent, Solution const& solution,
375 Solution::Folder const& folder)

Callers 2

WriteSlnxFolderFunction · 0.85
WriteSlnxFunction · 0.85

Calls 5

AttributeMethod · 0.80
cmXMLElementClass · 0.70
cmStrCatFunction · 0.70
sizeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…