Commit d29c887f authored by Drew's avatar Drew

Update to Swift 3

parent 20260304
Subproject commit 1d31216ca510396a25bff20652e6d581907c2f14
Subproject commit 63ae503e3517101e6de2445379731e640704360a
......@@ -26,7 +26,7 @@
:name "xcode_emit"
:output-type "executable"
:dependencies ["atpkg.atpkg" "atfoundation.atfoundation"]
:link-with ["atpkg.a" "atfoundation.a"]
:link-with-product ["atpkg.a" "atfoundation.a"]
:link-options ["-static-stdlib"]
:executable-name "xcode-emit"
}
......
......@@ -134,7 +134,7 @@ func pbxproj(task: Task, testTask: Task?, package: Package) -> Pbxproj {
var targets : [PbxNativeTarget] = []
var objects = process(tasks: package.prunedDependencyGraph(task: task).reversed(), testTask: testTask, package: package, xcodeprojGUID: guid)
for object in objects {
if object.dynamicType == PbxNativeTarget.self {
if type(of: object) == PbxNativeTarget.self {
targets.append(object as! PbxNativeTarget)
}
}
......
......@@ -27,26 +27,26 @@ func usage() {
}
if Process.arguments.count <= 1 {
if CommandLine.arguments.count <= 1 {
usage()
exit(1)
}
if Process.arguments[1] == "--help" {
if CommandLine.arguments[1] == "--help" {
usage()
exit(1)
}
var testTaskName: String? = nil
for (x,arg) in Process.arguments.enumerated() {
if arg == "--platform" && Process.arguments[x+1] == "ios" {
for (x,arg) in CommandLine.arguments.enumerated() {
if arg == "--platform" && CommandLine.arguments[x+1] == "ios" {
iosPlatform = true
}
if arg == "--test-task" {
testTaskName = Process.arguments[x+1]
testTaskName = CommandLine.arguments[x+1]
}
}
let taskName = Process.arguments[1]
let taskName = CommandLine.arguments[1]
let package = try! Package(filepath:Path("build.atpkg"), overlay: [], focusOnTask:taskName)
......
......@@ -167,6 +167,7 @@ struct PbxConfigurationHacks : PbxprojSerializable {
s += " SDKROOT = macosx;\n"
}
s += " SWIFT_OPTIMIZATION_LEVEL = \"-Onone\";\n"
s += " SWIFT_VERSION = \"3.0\";\n"
s += " };\n"
s += " name = Debug;\n"
s += "};\n"
......@@ -209,6 +210,8 @@ struct PbxConfigurationHacks : PbxprojSerializable {
else {
s += " SDKROOT = macosx;\n"
}
s += " SWIFT_VERSION = \"3.0\";\n"
s += " };\n"
s += " name = Release;\n"
s += "};\n"
......
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