Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save mkrautz/588070 to your computer and use it in GitHub Desktop.
Save mkrautz/588070 to your computer and use it in GitHub Desktop.
From 0790af3bf54f8b1fcd418fec4ff968ffa55f334c Mon Sep 17 00:00:00 2001
From: Mikkel Krautz <mikkel@krautz.dk>
Date: Mon, 20 Sep 2010 10:02:39 -0400
Subject: [PATCH 1/2] 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 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index c63b403..4e9969d 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<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()));
--
1.7.2.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment