summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeDetermineCompilerId.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-02-04 17:05:08 (GMT)
committerBrad King <brad.king@kitware.com>2019-02-04 18:26:10 (GMT)
commit96dece6dc11627d0e7b5588f63f2578b581cfb77 (patch)
tree8f7b85886b79e37a7f15c2e9e1406898080f36ea /Modules/CMakeDetermineCompilerId.cmake
parent6e91f5d6204e650c808b6585074faa248ee6e6a9 (diff)
downloadCMake-96dece6dc11627d0e7b5588f63f2578b581cfb77.zip
CMake-96dece6dc11627d0e7b5588f63f2578b581cfb77.tar.gz
CMake-96dece6dc11627d0e7b5588f63f2578b581cfb77.tar.bz2
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 'Modules/CMakeDetermineCompilerId.cmake')
-rw-r--r--Modules/CMakeDetermineCompilerId.cmake2
1 files changed, 2 insertions, 0 deletions
diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake
index 2a0dbd3..cdbaea6 100644
--- a/Modules/CMakeDetermineCompilerId.cmake
+++ b/Modules/CMakeDetermineCompilerId.cmake
@@ -332,6 +332,8 @@ Id flags: ${testflags} ${CMAKE_${lang}_COMPILER_ID_FLAGS_ALWAYS}
if("${lang}" STREQUAL "Swift")
if(CMAKE_Swift_LANGUAGE_VERSION)
set(id_lang_version "SWIFT_VERSION = ${CMAKE_Swift_LANGUAGE_VERSION};")
+ elseif(XCODE_VERSION VERSION_GREATER_EQUAL 10.2)
+ set(id_lang_version "SWIFT_VERSION = 4.0;")
elseif(XCODE_VERSION VERSION_GREATER_EQUAL 8.3)
set(id_lang_version "SWIFT_VERSION = 3.0;")
else()