diff options
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmGlobalXCodeGenerator.cxx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index 8627cf2..dd771b1 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -3075,10 +3075,14 @@ bool cmGlobalXCodeGenerator::CreateXCodeObjects( this->CreateString(this->GeneratorToolset)); } if (this->GetLanguageEnabled("Swift")) { - std::string swiftVersion = "2.3"; + std::string swiftVersion; if (const char* vers = this->CurrentMakefile->GetDefinition( "CMAKE_Swift_LANGUAGE_VERSION")) { swiftVersion = vers; + } else if (this->XcodeVersion >= 83) { + swiftVersion = "3.0"; + } else { + swiftVersion = "2.3"; } buildSettings->AddAttribute("SWIFT_VERSION", this->CreateString(swiftVersion)); |