BUG: 7763 fix, OPTIMIZATION was not set right. Also fix for BUG 7764, put XCODE_ATTRIBUTES_ last

This commit is contained in:
Bill Hoffman 2008-10-02 13:49:32 -04:00
parent 9d6cec87e0
commit 600470e5ca
1 changed files with 14 additions and 16 deletions

View File

@ -1618,26 +1618,10 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target,
debugStr = "NO";
}
// Convert "XCODE_ATTRIBUTE_*" properties directly.
{
cmPropertyMap const& props = target.GetProperties();
for(cmPropertyMap::const_iterator i = props.begin();
i != props.end(); ++i)
{
if(i->first.find("XCODE_ATTRIBUTE_") == 0)
{
buildSettings->AddAttribute(i->first.substr(16).c_str(),
this->CreateString(i->second.GetValue()));
}
}
}
buildSettings->AddAttribute("GCC_GENERATE_DEBUGGING_SYMBOLS",
this->CreateString(debugStr));
buildSettings->AddAttribute("GCC_OPTIMIZATION_LEVEL",
this->CreateString(optLevel));
buildSettings->AddAttribute("OPTIMIZATION_CFLAGS",
this->CreateString(oflagc.c_str()));
buildSettings->AddAttribute("GCC_SYMBOLS_PRIVATE_EXTERN",
this->CreateString("NO"));
buildSettings->AddAttribute("GCC_INLINES_ARE_PRIVATE_EXTERN",
@ -1730,6 +1714,20 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target,
buildSettings->AddAttribute("DYLIB_COMPATIBILITY_VERSION",
this->CreateString(vso.str().c_str()));
}
// put this last so it can override existing settings
// Convert "XCODE_ATTRIBUTE_*" properties directly.
{
cmPropertyMap const& props = target.GetProperties();
for(cmPropertyMap::const_iterator i = props.begin();
i != props.end(); ++i)
{
if(i->first.find("XCODE_ATTRIBUTE_") == 0)
{
buildSettings->AddAttribute(i->first.substr(16).c_str(),
this->CreateString(i->second.GetValue()));
}
}
}
}
//----------------------------------------------------------------------------