diff options
author | Gregor Jasny <gjasny@googlemail.com> | 2016-06-12 19:39:16 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-06-17 14:49:05 (GMT) |
commit | 82ebbf683e201af7b9bb493a221804992abf5a4a (patch) | |
tree | 2b91dcaffffe254981c576c48eaa86842d65ef6f /Source/cmXCodeObject.cxx | |
parent | 025edea019fa95581045ad6b83e7556a83d15f69 (diff) | |
download | CMake-82ebbf683e201af7b9bb493a221804992abf5a4a.zip CMake-82ebbf683e201af7b9bb493a221804992abf5a4a.tar.gz CMake-82ebbf683e201af7b9bb493a221804992abf5a4a.tar.bz2 |
Xcode: Add function to conditionally add Xcode Attributes
Diffstat (limited to 'Source/cmXCodeObject.cxx')
-rw-r--r-- | Source/cmXCodeObject.cxx | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Source/cmXCodeObject.cxx b/Source/cmXCodeObject.cxx index 3d31343..fabf097 100644 --- a/Source/cmXCodeObject.cxx +++ b/Source/cmXCodeObject.cxx @@ -83,6 +83,22 @@ cmXCodeObject::cmXCodeObject(PBXType ptype, Type type) } } +bool cmXCodeObject::IsEmpty() const +{ + switch (this->TypeValue) { + case OBJECT_LIST: + return this->List.empty(); + case STRING: + return this->String.empty(); + case ATTRIBUTE_GROUP: + return this->ObjectAttributes.empty(); + case OBJECT_REF: + case OBJECT: + return this->Object == 0; + } + return true; // unreachable, but quiets warnings +} + void cmXCodeObject::Indent(int level, std::ostream& out) { while (level) { |