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.
This commit is contained in:
parent
4c06e23307
commit
0790af3bf5
@ -2726,12 +2726,14 @@ void cmGlobalXCodeGenerator
|
|||||||
buildSettings->AddAttribute("SDKROOT",
|
buildSettings->AddAttribute("SDKROOT",
|
||||||
this->CreateString(sysroot));
|
this->CreateString(sysroot));
|
||||||
std::string archString;
|
std::string archString;
|
||||||
|
const char* sep = "";
|
||||||
for( std::vector<std::string>::iterator i =
|
for( std::vector<std::string>::iterator i =
|
||||||
this->Architectures.begin();
|
this->Architectures.begin();
|
||||||
i != this->Architectures.end(); ++i)
|
i != this->Architectures.end(); ++i)
|
||||||
{
|
{
|
||||||
|
archString += sep;
|
||||||
archString += *i;
|
archString += *i;
|
||||||
archString += " ";
|
sep = " ";
|
||||||
}
|
}
|
||||||
buildSettings->AddAttribute("ARCHS",
|
buildSettings->AddAttribute("ARCHS",
|
||||||
this->CreateString(archString.c_str()));
|
this->CreateString(archString.c_str()));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user