Explorar o código

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.
Mikkel Krautz %!s(int64=15) %!d(string=hai) anos
pai
achega
0790af3bf5
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      Source/cmGlobalXCodeGenerator.cxx

+ 3 - 1
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()));