mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-24 07:08:38 -05:00
Merge topic '16742-swift-3.0'
77139e32Swift: Simplify mixed test case to make it version agnosticc03141c0Swift: Default to Swift 3.0 with Xcode 8.3 and later Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !638
This commit is contained in:
@@ -3117,10 +3117,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));
|
||||
|
||||
Reference in New Issue
Block a user