mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-22 06:59:01 -06:00
Xcode: Add function to conditionally add Xcode Attributes
This commit is contained in:
@@ -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); }
|
||||
|
||||
Reference in New Issue
Block a user