diff options
author | Brad King <brad.king@kitware.com> | 2019-02-04 12:05:08 -0500 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-02-04 13:26:10 -0500 |
commit | 96dece6dc11627d0e7b5588f63f2578b581cfb77 (patch) | |
tree | 8f7b85886b79e37a7f15c2e9e1406898080f36ea /Tests | |
parent | 6e91f5d6204e650c808b6585074faa248ee6e6a9 (diff) | |
download | cmake-96dece6dc11627d0e7b5588f63f2578b581cfb77.tar.gz |
Xcode: Update default Swift language version for Xcode 10.2
Xcode 10.2 no longer supports Swift language versions before 4.0.
Fixes: #18871
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/SwiftOnly/CMakeLists.txt | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Tests/SwiftOnly/CMakeLists.txt b/Tests/SwiftOnly/CMakeLists.txt index cf4463ccf6..e5f858803e 100644 --- a/Tests/SwiftOnly/CMakeLists.txt +++ b/Tests/SwiftOnly/CMakeLists.txt @@ -1,7 +1,9 @@ cmake_minimum_required(VERSION 3.3) project(SwiftOnly Swift) -if(NOT XCODE_VERSION VERSION_LESS 8.0) +if(NOT XCODE_VERSION VERSION_LESS 10.2) + set(CMAKE_Swift_LANGUAGE_VERSION 5.0) +elseif(NOT XCODE_VERSION VERSION_LESS 8.0) set(CMAKE_Swift_LANGUAGE_VERSION 3.0) endif() |