mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-15 20:46:37 +08:00
cmGlobalXCodeGenerator: Factor out helper to append attribute
This commit is contained in:
@@ -3213,6 +3213,15 @@ void cmGlobalXCodeGenerator::AppendOrAddBuildSetting(cmXCodeObject* settings,
|
||||
if (!attr) {
|
||||
settings->AddAttribute(attribute, value);
|
||||
} else {
|
||||
this->AppendBuildSettingAttribute(settings, attribute, attr, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void cmGlobalXCodeGenerator::AppendBuildSettingAttribute(
|
||||
cmXCodeObject* settings, const char* attribute, cmXCodeObject* attr,
|
||||
cmXCodeObject* value)
|
||||
{
|
||||
if (value->GetType() != cmXCodeObject::OBJECT_LIST &&
|
||||
value->GetType() != cmXCodeObject::STRING) {
|
||||
cmSystemTools::Error("Unsupported value type for appending: " +
|
||||
@@ -3242,8 +3251,6 @@ void cmGlobalXCodeGenerator::AppendOrAddBuildSetting(cmXCodeObject* settings,
|
||||
cmSystemTools::Error("Unsupported attribute type for appending: " +
|
||||
std::string(attribute));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void cmGlobalXCodeGenerator::AppendBuildSettingAttribute(
|
||||
|
@@ -182,6 +182,9 @@ private:
|
||||
cmGeneratorTarget* gtgt);
|
||||
void AppendOrAddBuildSetting(cmXCodeObject* settings, const char* attr,
|
||||
cmXCodeObject* value);
|
||||
void AppendBuildSettingAttribute(cmXCodeObject* settings,
|
||||
const char* attribute, cmXCodeObject* attr,
|
||||
cmXCodeObject* value);
|
||||
void AppendBuildSettingAttribute(cmXCodeObject* target, const char* attr,
|
||||
cmXCodeObject* value,
|
||||
const std::string& configName);
|
||||
|
Reference in New Issue
Block a user