From 0790af3bf54f8b1fcd418fec4ff968ffa55f334c Mon Sep 17 00:00:00 2001 From: Mikkel Krautz Date: Mon, 20 Sep 2010 10:02:39 -0400 Subject: [PATCH] Xcode: Avoid trailing space in ARCHS list (#11244) With CMAKE_OSX_ARCHITECTURE settings such as $(ARCHS_STANDARD_32BIT), the space inserted by the for loop would confuse Xcode if quoted. In this particular example, what would be output would be: ARCHS = "$(ARCHS_STANDARD_32BIT) "; The Xcode UI does not recognize this as the built-in "Standards 32-bit" architecture setting unless the space is removed. --- Source/cmGlobalXCodeGenerator.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index c63b4034d..4e9969d0b 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -2726,12 +2726,14 @@ void cmGlobalXCodeGenerator buildSettings->AddAttribute("SDKROOT", this->CreateString(sysroot)); std::string archString; + const char* sep = ""; for( std::vector::iterator i = this->Architectures.begin(); i != this->Architectures.end(); ++i) { + archString += sep; archString += *i; - archString += " "; + sep = " "; } buildSettings->AddAttribute("ARCHS", this->CreateString(archString.c_str()));