summaryrefslogtreecommitdiff
path: root/tests/console_swift
diff options
context:
space:
mode:
authorruki <[email protected]>2016-02-22 08:49:20 +0800
committerruki <[email protected]>2016-02-22 08:49:20 +0800
commitec6fd4eeca3fa468cffb25b472eb349c1fed06aa (patch)
tree3dbbb42e44310d8ae80ba2361a9f34bbbb90da13 /tests/console_swift
parent762f3cd87615acbed339931bfb56c2b75c44cfa0 (diff)
modify tests script
Diffstat (limited to 'tests/console_swift')
-rwxr-xr-xtests/console_swift/src/main.swift3
-rwxr-xr-xtests/console_swift/xmake.lua32
2 files changed, 35 insertions, 0 deletions
diff --git a/tests/console_swift/src/main.swift b/tests/console_swift/src/main.swift
new file mode 100755
index 000000000..ee21045f4
--- /dev/null
+++ b/tests/console_swift/src/main.swift
@@ -0,0 +1,3 @@
+import Foundation
+
+print("hello world!")
diff --git a/tests/console_swift/xmake.lua b/tests/console_swift/xmake.lua
new file mode 100755
index 000000000..68f822d8f
--- /dev/null
+++ b/tests/console_swift/xmake.lua
@@ -0,0 +1,32 @@
+-- the debug mode
+if is_mode("debug") then
+
+ -- enable the debug symbols
+ set_symbols("debug")
+
+ -- disable optimization
+ set_optimize("none")
+end
+
+-- the release mode
+if is_mode("release") then
+
+ -- set the symbols visibility: hidden
+ set_symbols("hidden")
+
+ -- enable fastest optimization
+ set_optimize("fastest")
+
+ -- strip all symbols
+ set_strip("all")
+end
+
+-- add target
+target("swift_console")
+
+ -- set kind
+ set_kind("binary")
+
+ -- add files
+ add_files("src/*.swift")
+