summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-09-23 15:43:08 (GMT)
committerBrad King <brad.king@kitware.com>2016-09-23 15:47:06 (GMT)
commit49d50ad40719722236c7867bd69e7ab414224c49 (patch)
tree8b92952a2de01ce221b9a383a6c3881da295927a /Modules
parent6757e6608992354300d635a96fed29800a4856c3 (diff)
downloadCMake-49d50ad40719722236c7867bd69e7ab414224c49.zip
CMake-49d50ad40719722236c7867bd69e7ab414224c49.tar.gz
CMake-49d50ad40719722236c7867bd69e7ab414224c49.tar.bz2
Xcode: Port rudimentary Swift support to Xcode 8
The `.pbxproj` file must now specify a `SWIFT_VERSION` value. Set it to the legacy value of "2.3" for now. Later this can be made configurable (e.g. to "3.0").
Diffstat (limited to 'Modules')
-rw-r--r--Modules/CMakeDetermineCompilerId.cmake5
-rw-r--r--Modules/CompilerId/Xcode-3.pbxproj.in1
2 files changed, 6 insertions, 0 deletions
diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake
index 64d9bed..3d1ca6d 100644
--- a/Modules/CMakeDetermineCompilerId.cmake
+++ b/Modules/CMakeDetermineCompilerId.cmake
@@ -266,6 +266,11 @@ Id flags: ${testflags}
else()
set(id_toolset "")
endif()
+ if("${lang}" STREQUAL "Swift")
+ set(id_lang_version "SWIFT_VERSION = 2.3;")
+ else()
+ set(id_lang_version "")
+ endif()
if(CMAKE_OSX_DEPLOYMENT_TARGET)
set(id_deployment_target
"MACOSX_DEPLOYMENT_TARGET = \"${CMAKE_OSX_DEPLOYMENT_TARGET}\";")
diff --git a/Modules/CompilerId/Xcode-3.pbxproj.in b/Modules/CompilerId/Xcode-3.pbxproj.in
index 20f3da3..22ad4f6 100644
--- a/Modules/CompilerId/Xcode-3.pbxproj.in
+++ b/Modules/CompilerId/Xcode-3.pbxproj.in
@@ -84,6 +84,7 @@
CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)";
SYMROOT = .;
@id_toolset@
+ @id_lang_version@
@id_deployment_target@
@id_sdkroot@
};