|
|
@@ -2997,7 +2997,13 @@ bool cmGlobalXCodeGenerator::CreateXCodeObjects(
|
|
|
this->CreateString(this->GeneratorToolset));
|
|
|
}
|
|
|
if (this->GetLanguageEnabled("Swift")) {
|
|
|
- buildSettings->AddAttribute("SWIFT_VERSION", this->CreateString("2.3"));
|
|
|
+ std::string swiftVersion = "2.3";
|
|
|
+ if (const char* vers = this->CurrentMakefile->GetDefinition(
|
|
|
+ "CMAKE_Swift_LANGUAGE_VERSION")) {
|
|
|
+ swiftVersion = vers;
|
|
|
+ }
|
|
|
+ buildSettings->AddAttribute("SWIFT_VERSION",
|
|
|
+ this->CreateString(swiftVersion));
|
|
|
}
|
|
|
|
|
|
std::string symroot = root->GetCurrentBinaryDirectory();
|