From cc8e42ee6180d4848997d96a08826851bfc120c1 Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 21 Sep 2026 19:55:34 -0400 Subject: [PATCH] Xcode: Drop unused buildStyles field from generated project object The `buildStyles` field was deprecated by Xcode 2.1, and has been ignored since Xcode 3. Since commit 7373b389eb (Xcode: Drop support for Xcode versions below 3, 2017-04-21, v3.9.0-rc1~223^2) we do not need to support older versions. Fixes: #20704 --- Source/cmGlobalXCodeGenerator.cxx | 14 -------------- Source/cmXCode21Object.cxx | 1 - Source/cmXCodeObject.cxx | 1 - Source/cmXCodeObject.h | 1 - 4 files changed, 17 deletions(-) diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index 9bdbb9caff..66a4d14627 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -4765,19 +4765,6 @@ bool cmGlobalXCodeGenerator::CreateXCodeObjects( this->RootObject = nullptr; this->MainGroupChildren = nullptr; this->FrameworkGroup = nullptr; - cmXCodeObject* listObjs = this->CreateObject(cmXCodeObject::OBJECT_LIST); - for (std::string const& CurrentConfigurationType : - this->CurrentConfigurationTypes) { - cmXCodeObject* buildStyle = - this->CreateObject(cmXCodeObject::PBXBuildStyle); - std::string const& name = CurrentConfigurationType; - buildStyle->AddAttribute("name", this->CreateString(name)); - buildStyle->SetComment(name); - cmXCodeObject* sgroup = this->CreateObject(cmXCodeObject::ATTRIBUTE_GROUP); - sgroup->AddAttribute("COPY_PHASE_STRIP", this->CreateString("NO")); - buildStyle->AddAttribute("buildSettings", sgroup); - listObjs->AddObject(buildStyle); - } cmXCodeObject* mainGroup = this->CreateObject(cmXCodeObject::PBXGroup); this->MainGroupChildren = this->CreateObject(cmXCodeObject::OBJECT_LIST); @@ -4827,7 +4814,6 @@ bool cmGlobalXCodeGenerator::CreateXCodeObjects( this->RootObject->AddAttribute("mainGroup", this->CreateObjectReference(mainGroup)); this->RootObject->AddAttribute("buildSettings", projectBuildSettings); - this->RootObject->AddAttribute("buildStyles", listObjs); this->RootObject->AddAttribute("hasScannedForEncodings", this->CreateString("0")); cmXCodeObject* projectAttributes = diff --git a/Source/cmXCode21Object.cxx b/Source/cmXCode21Object.cxx index 74db53d81f..94625b53a6 100644 --- a/Source/cmXCode21Object.cxx +++ b/Source/cmXCode21Object.cxx @@ -59,7 +59,6 @@ void cmXCode21Object::PrintList( out << "objects = {\n"; cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXAggregateTarget); cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXBuildFile); - cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXBuildStyle); cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXContainerItemProxy); cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXFileReference); cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXFrameworksBuildPhase); diff --git a/Source/cmXCodeObject.cxx b/Source/cmXCodeObject.cxx index b9f472697f..41c810aad1 100644 --- a/Source/cmXCodeObject.cxx +++ b/Source/cmXCodeObject.cxx @@ -12,7 +12,6 @@ char const* cmXCodeObject::PBXTypeNames[] = { /* clang-format needs this comment to break after the opening brace */ "PBXGroup", - "PBXBuildStyle", "PBXProject", "PBXHeadersBuildPhase", "PBXSourcesBuildPhase", diff --git a/Source/cmXCodeObject.h b/Source/cmXCodeObject.h index d68154b638..29f65dc0a3 100644 --- a/Source/cmXCodeObject.h +++ b/Source/cmXCodeObject.h @@ -31,7 +31,6 @@ public: enum PBXType { PBXGroup, - PBXBuildStyle, PBXProject, PBXHeadersBuildPhase, PBXSourcesBuildPhase,