diff options
author | Brad King <brad.king@kitware.com> | 2017-03-29 14:40:59 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-03-29 14:40:59 (GMT) |
commit | 6ca509e7c65a94f4b486bacef766bac717f5308f (patch) | |
tree | 37a52f9fcfbf5ab98d3848ef65062689064a3ac3 /Modules | |
parent | d4a995750a1e3101f943a0d2e91fc9688f5e23f7 (diff) | |
parent | 77139e320c8ec7f92e1298cc57fea7276faceb12 (diff) | |
download | CMake-6ca509e7c65a94f4b486bacef766bac717f5308f.zip CMake-6ca509e7c65a94f4b486bacef766bac717f5308f.tar.gz CMake-6ca509e7c65a94f4b486bacef766bac717f5308f.tar.bz2 |
Merge branch '16742-swift-3.0' into release
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/CMakeDetermineCompilerId.cmake | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake index bb34de5..c41a986 100644 --- a/Modules/CMakeDetermineCompilerId.cmake +++ b/Modules/CMakeDetermineCompilerId.cmake @@ -269,7 +269,13 @@ Id flags: ${testflags} ${CMAKE_${lang}_COMPILER_ID_FLAGS_ALWAYS} set(id_toolset "") endif() if("${lang}" STREQUAL "Swift") - set(id_lang_version "SWIFT_VERSION = 2.3;") + if(CMAKE_Swift_LANGUAGE_VERSION) + set(id_lang_version "SWIFT_VERSION = ${CMAKE_Swift_LANGUAGE_VERSION};") + elseif(XCODE_VERSION VERSION_GREATER_EQUAL 8.3) + set(id_lang_version "SWIFT_VERSION = 3.0;") + else() + set(id_lang_version "SWIFT_VERSION = 2.3;") + endif() else() set(id_lang_version "") endif() |