mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-26 16:18:43 -05:00
Merge topic 'stable-xcode-projects'
6693590fXcode: Refine quoting rules for Stringsa6331eb8Xcode: Let PrintComment decide if the comment is non-empty6e8952c1Xcode: PrintComment will prepend a whitespace itself before the comment4bd2544bXcode: Do not add whitespace after attribute group opening brace5cb4c838Xcode: Properly indent PBXFileReference and PBXBuildFilea723427bXcode: Remove extra space in PBXProject comment2fe8bca5Xcode: Add comment after root object2e0e205eXcode: Indent using tabs7b68c8dfXcode: Sort Xcode objects by Id
This commit is contained in:
@@ -591,6 +591,20 @@ void cmGlobalXCodeGenerator::CreateReRunCMakeFile(
|
||||
mf->GetHomeOutputDirectory()) << "\n";
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
static bool objectIdLessThan(cmXCodeObject* l, cmXCodeObject* r)
|
||||
{
|
||||
return l->GetId() < r->GetId();
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void cmGlobalXCodeGenerator::SortXCodeObjects()
|
||||
{
|
||||
std::sort(this->XCodeObjects.begin(), this->XCodeObjects.end(),
|
||||
objectIdLessThan);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void cmGlobalXCodeGenerator::ClearXCodeObjects()
|
||||
{
|
||||
@@ -3372,7 +3386,7 @@ bool cmGlobalXCodeGenerator
|
||||
}
|
||||
configlist->AddAttribute("buildConfigurations", buildConfigurations);
|
||||
|
||||
std::string comment = "Build configuration list for PBXProject ";
|
||||
std::string comment = "Build configuration list for PBXProject";
|
||||
comment += " \"";
|
||||
comment += this->CurrentProject;
|
||||
comment += "\"";
|
||||
@@ -3713,6 +3727,8 @@ cmGlobalXCodeGenerator::WriteXCodePBXProj(std::ostream& fout,
|
||||
cmLocalGenerator* ,
|
||||
std::vector<cmLocalGenerator*>& )
|
||||
{
|
||||
SortXCodeObjects();
|
||||
|
||||
fout << "// !$*UTF8*$!\n";
|
||||
fout << "{\n";
|
||||
cmXCodeObject::Indent(1, fout);
|
||||
@@ -3740,7 +3756,8 @@ cmGlobalXCodeGenerator::WriteXCodePBXProj(std::ostream& fout,
|
||||
cmXCodeObject::PrintList(this->XCodeObjects, fout);
|
||||
}
|
||||
cmXCodeObject::Indent(1, fout);
|
||||
fout << "rootObject = " << this->RootObject->GetId() << ";\n";
|
||||
fout << "rootObject = " << this->RootObject->GetId()
|
||||
<< " /* Project object */;\n";
|
||||
fout << "}\n";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user