Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(530)

Unified Diff: tools/gn/xcode_object.h

Issue 2779833002: [iOS] Add application target as dependency of xctest module target. (Closed)
Patch Set: Update comments Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tools/gn/xcode_object.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/xcode_object.h
diff --git a/tools/gn/xcode_object.h b/tools/gn/xcode_object.h
index a6ab32ad8e06cb432c42631d34f6d16b8679d722..c695dbbeaad39f3d0f53d1387e3d49fe943270f3 100644
--- a/tools/gn/xcode_object.h
+++ b/tools/gn/xcode_object.h
@@ -33,6 +33,7 @@ enum PBXObjectClass {
// Those values needs to stay sorted in alphabetic order.
PBXAggregateTargetClass,
PBXBuildFileClass,
+ PBXContainerItemProxyClass,
PBXFileReferenceClass,
PBXFrameworksBuildPhaseClass,
PBXGroupClass,
@@ -40,6 +41,7 @@ enum PBXObjectClass {
PBXProjectClass,
PBXShellScriptBuildPhaseClass,
PBXSourcesBuildPhaseClass,
+ PBXTargetDependencyClass,
XCBuildConfigurationClass,
XCConfigurationListClass,
};
@@ -50,8 +52,9 @@ const char* ToString(PBXObjectClass cls);
class PBXAggregateTarget;
class PBXBuildFile;
-class PBXFileReference;
class PBXBuildPhase;
+class PBXContainerItemProxy;
+class PBXFileReference;
class PBXFrameworksBuildPhase;
class PBXGroup;
class PBXNativeTarget;
@@ -60,6 +63,7 @@ class PBXProject;
class PBXShellScriptBuildPhase;
class PBXSourcesBuildPhase;
class PBXTarget;
+class PBXTargetDependency;
class XCBuildConfiguration;
class XCConfigurationList;
@@ -122,13 +126,16 @@ class PBXTarget : public PBXObject {
const PBXAttributes& attributes);
~PBXTarget() override;
- // PXBObject implementation.
+ void AddDependency(std::unique_ptr<PBXTargetDependency> dependency);
+
+ // PBXObject implementation.
std::string Name() const override;
void Visit(PBXObjectVisitor& visitor) override;
protected:
std::unique_ptr<XCConfigurationList> configurations_;
std::vector<std::unique_ptr<PBXBuildPhase>> build_phases_;
+ std::vector<std::unique_ptr<PBXTargetDependency>> dependencies_;
PBXSourcesBuildPhase* source_build_phase_;
std::string name_;
@@ -146,7 +153,7 @@ class PBXAggregateTarget : public PBXTarget {
const PBXAttributes& attributes);
~PBXAggregateTarget() override;
- // PXBObject implementation.
+ // PBXObject implementation.
PBXObjectClass Class() const override;
void Print(std::ostream& out, unsigned indent) const override;
@@ -163,7 +170,7 @@ class PBXBuildFile : public PBXObject {
const CompilerFlags compiler_flag);
~PBXBuildFile() override;
- // PXBObject implementation.
+ // PBXObject implementation.
PBXObjectClass Class() const override;
std::string Name() const override;
void Print(std::ostream& out, unsigned indent) const override;
@@ -176,6 +183,25 @@ class PBXBuildFile : public PBXObject {
DISALLOW_COPY_AND_ASSIGN(PBXBuildFile);
};
+// PBXContainerItemProxy ------------------------------------------------------
+class PBXContainerItemProxy : public PBXObject {
+ public:
+ PBXContainerItemProxy(const PBXProject* project, const PBXTarget* target);
+ ~PBXContainerItemProxy() override;
+
+ // PBXObject implementation.
+ PBXObjectClass Class() const override;
+ std::string Name() const override;
+ void Visit(PBXObjectVisitor& visitor) override;
+ void Print(std::ostream& out, unsigned indent) const override;
+
+ private:
+ const PBXProject* project_;
+ const PBXTarget* target_;
+
+ DISALLOW_COPY_AND_ASSIGN(PBXContainerItemProxy);
+};
+
// PBXFileReference -----------------------------------------------------------
class PBXFileReference : public PBXObject {
@@ -372,6 +398,27 @@ class PBXSourcesBuildPhase : public PBXBuildPhase {
DISALLOW_COPY_AND_ASSIGN(PBXSourcesBuildPhase);
};
+// PBXTargetDependency -----------------------------------------------------
+class PBXTargetDependency : public PBXObject {
+ public:
+ PBXTargetDependency(
+ const PBXTarget* target,
+ std::unique_ptr<PBXContainerItemProxy> container_item_proxy);
+ ~PBXTargetDependency() override;
+
+ // PBXObject implementation.
+ PBXObjectClass Class() const override;
+ std::string Name() const override;
+ void Visit(PBXObjectVisitor& visitor) override;
+ void Print(std::ostream& out, unsigned indent) const override;
+
+ private:
+ const PBXTarget* target_;
+ std::unique_ptr<PBXContainerItemProxy> container_item_proxy_;
+
+ DISALLOW_COPY_AND_ASSIGN(PBXTargetDependency);
+};
+
// XCBuildConfiguration -------------------------------------------------------
class XCBuildConfiguration : public PBXObject {
« no previous file with comments | « no previous file | tools/gn/xcode_object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698