mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-08 14:50:10 -06:00
Xcode: Do not autocreate schemes
This commit is contained in:
@@ -3345,6 +3345,7 @@ void cmGlobalXCodeGenerator::OutputXCodeProject(
|
||||
"XCODE_GENERATE_SCHEME") &&
|
||||
this->XcodeVersion >= 70) {
|
||||
this->OutputXCodeSharedSchemes(xcodeDir, root);
|
||||
this->OutputXCodeWorkspaceSettings(xcodeDir);
|
||||
}
|
||||
|
||||
this->ClearXCodeObjects();
|
||||
@@ -3373,6 +3374,36 @@ void cmGlobalXCodeGenerator::OutputXCodeSharedSchemes(
|
||||
}
|
||||
}
|
||||
|
||||
void cmGlobalXCodeGenerator::OutputXCodeWorkspaceSettings(
|
||||
const std::string& xcProjDir)
|
||||
{
|
||||
std::string xcodeSharedDataDir = xcProjDir;
|
||||
xcodeSharedDataDir += "/project.xcworkspace/xcshareddata";
|
||||
cmSystemTools::MakeDirectory(xcodeSharedDataDir);
|
||||
|
||||
std::string workspaceSettingsFile = xcodeSharedDataDir;
|
||||
workspaceSettingsFile += "/WorkspaceSettings.xcsettings";
|
||||
|
||||
cmGeneratedFileStream fout(workspaceSettingsFile.c_str());
|
||||
fout.SetCopyIfDifferent(true);
|
||||
if (!fout) {
|
||||
return;
|
||||
}
|
||||
|
||||
cmXMLWriter xout(fout);
|
||||
xout.StartDocument();
|
||||
xout.Doctype("plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\""
|
||||
"\"http://www.apple.com/DTDs/PropertyList-1.0.dtd\"");
|
||||
xout.StartElement("plist");
|
||||
xout.Attribute("version", "1.0");
|
||||
xout.StartElement("dict");
|
||||
xout.Element("key", "IDEWorkspaceSharedSettings_AutocreateContextsIfNeeded");
|
||||
xout.Element("false");
|
||||
xout.EndElement(); // dict
|
||||
xout.EndElement(); // plist
|
||||
xout.EndDocument();
|
||||
}
|
||||
|
||||
void cmGlobalXCodeGenerator::WriteXCodePBXProj(std::ostream& fout,
|
||||
cmLocalGenerator*,
|
||||
std::vector<cmLocalGenerator*>&)
|
||||
|
||||
@@ -168,6 +168,7 @@ private:
|
||||
// Write shared scheme files for all the native targets
|
||||
void OutputXCodeSharedSchemes(const std::string& xcProjDir,
|
||||
cmLocalGenerator* root);
|
||||
void OutputXCodeWorkspaceSettings(const std::string& xcProjDir);
|
||||
void WriteXCodePBXProj(std::ostream& fout, cmLocalGenerator* root,
|
||||
std::vector<cmLocalGenerator*>& generators);
|
||||
cmXCodeObject* CreateXCodeFileReferenceFromPath(const std::string& fullpath,
|
||||
|
||||
Reference in New Issue
Block a user