| 5219 | } |
| 5220 | |
| 5221 | void 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 | |
| 5271 | void cmGlobalXCodeGenerator::WriteXCodePBXProj(std::ostream& fout, |
| 5272 | cmLocalGenerator*, |
no test coverage detected