diff options
| author | ruki <[email protected]> | 2017-05-19 21:30:30 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2017-05-19 21:32:13 +0800 |
| commit | 03b7d8b955d11895cc15332360eca7b14d6cf58f (patch) | |
| tree | 4aa9b47aa3f1957a0a4343e7b1c4a8357e7018d5 /tests/projects/console_objc | |
| parent | 58e3bad5859530c8316de4b4b7939169cdd2c492 (diff) | |
add projects and modules in tests
Diffstat (limited to 'tests/projects/console_objc')
| -rwxr-xr-x | tests/projects/console_objc/src/main.m | 10 | ||||
| -rwxr-xr-x | tests/projects/console_objc/xmake.lua | 42 |
2 files changed, 52 insertions, 0 deletions
diff --git a/tests/projects/console_objc/src/main.m b/tests/projects/console_objc/src/main.m new file mode 100755 index 000000000..61a3f5875 --- /dev/null +++ b/tests/projects/console_objc/src/main.m @@ -0,0 +1,10 @@ +#import <Foundation/Foundation.h> + +int main(int argc, char** argv) +{ + @autoreleasepool + { + NSLog(@"hello world!"); + } + return 0; +} diff --git a/tests/projects/console_objc/xmake.lua b/tests/projects/console_objc/xmake.lua new file mode 100755 index 000000000..146262351 --- /dev/null +++ b/tests/projects/console_objc/xmake.lua @@ -0,0 +1,42 @@ +-- 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 frameworks +add_frameworks("Foundation", "CoreFoundation") + +-- for macosx or ios +if is_os("macosx", "ios") then + + -- enable arc? + add_mxflags("-fobjc-arc") +end + +-- add target +target("console_objc") + + -- set kind + set_kind("binary") + + -- add files + add_files("src/*.m") + |
