Commit 49d50ad4 authored by Brad King's avatar Brad King

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").
parent 6757e660
......@@ -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}\";")
......
......@@ -84,6 +84,7 @@
CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)";
SYMROOT = .;
@id_toolset@
@id_lang_version@
@id_deployment_target@
@id_sdkroot@
};
......
......@@ -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";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment