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

Method OutputXCodeWorkspaceSettings

Source/cmGlobalXCodeGenerator.cxx:5221–5269  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5219}
5220
5221void cmGlobalXCodeGenerator::OutputXCodeWorkspaceSettings(
5222 std::string const& xcProjDir, bool hasGeneratedSchemes)
5223{
5224 std::string xcodeSharedDataDir =
5225 cmStrCat(xcProjDir, "/project.xcworkspace/xcshareddata");
5226 cmSystemTools::MakeDirectory(xcodeSharedDataDir);
5227
5228 std::string workspaceSettingsFile =
5229 cmStrCat(xcodeSharedDataDir, "/WorkspaceSettings.xcsettings");
5230
5231 cmGeneratedFileStream fout(workspaceSettingsFile);
5232 fout.SetCopyIfDifferent(true);
5233 if (!fout) {
5234 return;
5235 }
5236
5237 cmXMLWriter xout(fout);
5238 xout.StartDocument();
5239 xout.Doctype("plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\""
5240 "\"http://www.apple.com/DTDs/PropertyList-1.0.dtd\"");
5241 xout.StartElement("plist");
5242 xout.Attribute("version", "1.0");
5243 xout.StartElement("dict");
5244 if (this->XcodeVersion >= 100) {
5245 xout.Element("key", "BuildSystemType");
5246 switch (this->XcodeBuildSystem) {
5247 case BuildSystem::One:
5248 xout.Element("string", "Original");
5249 if (this->XcodeVersion >= 130) {
5250 xout.Element("key", "DisableBuildSystemDeprecationDiagnostic");
5251 } else {
5252 xout.Element("key", "DisableBuildSystemDeprecationWarning");
5253 }
5254 xout.Element("true");
5255 break;
5256 case BuildSystem::Twelve:
5257 xout.Element("string", "Latest");
5258 break;
5259 }
5260 }
5261 if (hasGeneratedSchemes) {
5262 xout.Element("key",
5263 "IDEWorkspaceSharedSettings_AutocreateContextsIfNeeded");
5264 xout.Element("false");
5265 }
5266 xout.EndElement(); // dict
5267 xout.EndElement(); // plist
5268 xout.EndDocument();
5269}
5270
5271void cmGlobalXCodeGenerator::WriteXCodePBXProj(std::ostream& fout,
5272 cmLocalGenerator*,

Callers 1

OutputXCodeProjectMethod · 0.95

Calls 9

SetCopyIfDifferentMethod · 0.80
StartDocumentMethod · 0.80
DoctypeMethod · 0.80
AttributeMethod · 0.80
EndDocumentMethod · 0.80
cmStrCatFunction · 0.70
StartElementMethod · 0.45
ElementMethod · 0.45
EndElementMethod · 0.45

Tested by

no test coverage detected