diff options
| author | ruki <[email protected]> | 2016-02-22 08:49:20 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2016-02-22 08:49:20 +0800 |
| commit | ec6fd4eeca3fa468cffb25b472eb349c1fed06aa (patch) | |
| tree | 3dbbb42e44310d8ae80ba2361a9f34bbbb90da13 /tests/console_c | |
| parent | 762f3cd87615acbed339931bfb56c2b75c44cfa0 (diff) | |
modify tests script
Diffstat (limited to 'tests/console_c')
| -rwxr-xr-x | tests/console_c/src/main.c | 7 | ||||
| -rwxr-xr-x | tests/console_c/xmake.lua | 33 |
2 files changed, 40 insertions, 0 deletions
diff --git a/tests/console_c/src/main.c b/tests/console_c/src/main.c new file mode 100755 index 000000000..9ae580511 --- /dev/null +++ b/tests/console_c/src/main.c @@ -0,0 +1,7 @@ +#include <stdio.h> + +int main(int argc, char** argv) +{ + printf("hello world!\n"); + return 0; +} diff --git a/tests/console_c/xmake.lua b/tests/console_c/xmake.lua new file mode 100755 index 000000000..889055a4d --- /dev/null +++ b/tests/console_c/xmake.lua @@ -0,0 +1,33 @@ +-- 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("c_console") + + -- set kind + set_kind("binary") + + -- add files + add_files("src/*.c") + + |
