summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-03-30 12:52:26 (GMT)
committerKitware Robot <kwrobot@kitware.com>2017-03-30 12:52:37 (GMT)
commit7bb8b38cce0715c758aa3eb252a9dfc0bda1e2c7 (patch)
tree4b659ac90a5c28c96e58d936f394c644639f8e42 /Source
parentf6d802b5bcd201f48c7af47f27ec9e1dd0062171 (diff)
parent77139e320c8ec7f92e1298cc57fea7276faceb12 (diff)
downloadCMake-7bb8b38cce0715c758aa3eb252a9dfc0bda1e2c7.zip
CMake-7bb8b38cce0715c758aa3eb252a9dfc0bda1e2c7.tar.gz
CMake-7bb8b38cce0715c758aa3eb252a9dfc0bda1e2c7.tar.bz2
Merge topic '16742-swift-3.0'
77139e32 Swift: Simplify mixed test case to make it version agnostic c03141c0 Swift: Default to Swift 3.0 with Xcode 8.3 and later Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !638
Diffstat (limited to 'Source')
-rw-r--r--Source/cmGlobalXCodeGenerator.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index 39f7b8f..42dd997 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -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));