summaryrefslogtreecommitdiff
path: root/Tests/SwiftOnly
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-09-23 13:25:35 -0400
committerBrad King <brad.king@kitware.com>2016-09-26 08:46:23 -0400
commitb35568f3f9f9b8f4b5b2a2e6f4d524540980c3ae (patch)
tree1fc4af01e44a75c99cf8da434e5fe58b7fcd07ff /Tests/SwiftOnly
parent49d50ad40719722236c7867bd69e7ab414224c49 (diff)
downloadcmake-b35568f3f9f9b8f4b5b2a2e6f4d524540980c3ae.tar.gz
Xcode: Add option to set Swift language version
Create a new CMAKE_Swift_LANGUAGE_VERSION variable to specify the SWIFT_VERSION attribute in a generated Xcode project. Ideally this would be a `<LANG>_STANDARD` property but since Swift support is very minimal we should reserve that property for more complete treatment later. Issue: #16326
Diffstat (limited to 'Tests/SwiftOnly')
-rw-r--r--Tests/SwiftOnly/CMakeLists.txt4
1 files changed, 4 insertions, 0 deletions
diff --git a/Tests/SwiftOnly/CMakeLists.txt b/Tests/SwiftOnly/CMakeLists.txt
index 5cb9739450..cf4463ccf6 100644
--- a/Tests/SwiftOnly/CMakeLists.txt
+++ b/Tests/SwiftOnly/CMakeLists.txt
@@ -1,4 +1,8 @@
cmake_minimum_required(VERSION 3.3)
project(SwiftOnly Swift)
+if(NOT XCODE_VERSION VERSION_LESS 8.0)
+ set(CMAKE_Swift_LANGUAGE_VERSION 3.0)
+endif()
+
add_executable(SwiftOnly main.swift)