From ec6fd4eeca3fa468cffb25b472eb349c1fed06aa Mon Sep 17 00:00:00 2001 From: ruki Date: Mon, 22 Feb 2016 08:49:20 +0800 Subject: modify tests script --- tests/console_objc++/src/main.mm | 10 ++++++++++ tests/console_objc++/xmake.lua | 43 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100755 tests/console_objc++/src/main.mm create mode 100755 tests/console_objc++/xmake.lua (limited to 'tests/console_objc++') diff --git a/tests/console_objc++/src/main.mm b/tests/console_objc++/src/main.mm new file mode 100755 index 000000000..61a3f5875 --- /dev/null +++ b/tests/console_objc++/src/main.mm @@ -0,0 +1,10 @@ +#import + +int main(int argc, char** argv) +{ + @autoreleasepool + { + NSLog(@"hello world!"); + } + return 0; +} diff --git a/tests/console_objc++/xmake.lua b/tests/console_objc++/xmake.lua new file mode 100755 index 000000000..ab706d51a --- /dev/null +++ b/tests/console_objc++/xmake.lua @@ -0,0 +1,43 @@ +-- 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 + +-- for macosx or ios +if os("macosx", "ios") then + + -- add framework + add_mxflags("-framework Foundation", "-framework CoreFoundation") + add_ldflags("-framework Foundation", "-framework CoreFoundation") + + -- enable arc? + add_mxflags("-fobjc-arc") +end + +-- add target +target("objcpp_console") + + -- set kind + set_kind("binary") + + -- add files + add_files("src/*.mm") + -- cgit v1.3.1