Merge topic 'xcode-ARCHS-quoting'

a8ded53 Xcode: Quote string values containing '$' (#11244)
0790af3 Xcode: Avoid trailing space in ARCHS list (#11244)
This commit is contained in:
Brad King 2010-09-21 10:42:50 -04:00 committed by CMake Topic Stage
commit 5968785b2f
2 changed files with 4 additions and 2 deletions

View File

@ -2726,12 +2726,14 @@ void cmGlobalXCodeGenerator
buildSettings->AddAttribute("SDKROOT",
this->CreateString(sysroot));
std::string archString;
const char* sep = "";
for( std::vector<std::string>::iterator i =
this->Architectures.begin();
i != this->Architectures.end(); ++i)
{
archString += sep;
archString += *i;
archString += " ";
sep = " ";
}
buildSettings->AddAttribute("ARCHS",
this->CreateString(archString.c_str()));

View File

@ -236,7 +236,7 @@ void cmXCodeObject::PrintString(std::ostream& os) const
// considered special by the Xcode project file parser.
bool needQuote =
(this->String.empty() ||
this->String.find_first_of(" <>.+-=@") != this->String.npos);
this->String.find_first_of(" <>.+-=@$") != this->String.npos);
const char* quote = needQuote? "\"" : "";
// Print the string, quoted and escaped as necessary.