summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Modules/CMakeDetermineCompilerId.cmake5
-rw-r--r--Modules/CompilerId/Xcode-3.pbxproj.in1
-rw-r--r--Source/cmGlobalXCodeGenerator.cxx3
3 files changed, 9 insertions, 0 deletions
diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake
index 64d9bed87a..3d1ca6d55e 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 20f3da3129..22ad4f6894 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@
};
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index 997f46c78d..42d97dbcde 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -2996,6 +2996,9 @@ bool cmGlobalXCodeGenerator::CreateXCodeObjects(
buildSettings->AddAttribute("GCC_VERSION",
this->CreateString(this->GeneratorToolset));
}
+ if (this->GetLanguageEnabled("Swift")) {
+ buildSettings->AddAttribute("SWIFT_VERSION", this->CreateString("2.3"));
+ }
std::string symroot = root->GetCurrentBinaryDirectory();
symroot += "/build";