summaryrefslogtreecommitdiffstats
path: root/Source/cmXCodeObject.h
diff options
context:
space:
mode:
authorGregor Jasny <gjasny@googlemail.com>2016-06-12 19:39:16 (GMT)
committerBrad King <brad.king@kitware.com>2016-06-17 14:49:05 (GMT)
commit82ebbf683e201af7b9bb493a221804992abf5a4a (patch)
tree2b91dcaffffe254981c576c48eaa86842d65ef6f /Source/cmXCodeObject.h
parent025edea019fa95581045ad6b83e7556a83d15f69 (diff)
downloadCMake-82ebbf683e201af7b9bb493a221804992abf5a4a.zip
CMake-82ebbf683e201af7b9bb493a221804992abf5a4a.tar.gz
CMake-82ebbf683e201af7b9bb493a221804992abf5a4a.tar.bz2
Xcode: Add function to conditionally add Xcode Attributes
Diffstat (limited to 'Source/cmXCodeObject.h')
-rw-r--r--Source/cmXCodeObject.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/Source/cmXCodeObject.h b/Source/cmXCodeObject.h
index 1502c27..ed917af 100644
--- a/Source/cmXCodeObject.h
+++ b/Source/cmXCodeObject.h
@@ -62,6 +62,8 @@ public:
Type GetType() const { return this->TypeValue; }
PBXType GetIsA() const { return this->IsA; }
+ bool IsEmpty() const;
+
void SetString(const std::string& s);
const std::string& GetString() const { return this->String; }
@@ -70,6 +72,13 @@ public:
this->ObjectAttributes[name] = value;
}
+ void AddAttributeIfNotEmpty(const std::string& name, cmXCodeObject* value)
+ {
+ if (value && !value->IsEmpty()) {
+ AddAttribute(name, value);
+ }
+ }
+
void SetObject(cmXCodeObject* value) { this->Object = value; }
cmXCodeObject* GetObject() { return this->Object; }
void AddObject(cmXCodeObject* value) { this->List.push_back(value); }