diff options
| author | ruki <[email protected]> | 2020-12-16 23:34:31 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-12-16 23:34:31 +0800 |
| commit | f3b3357ddad20367ff94e8b984a525a703d5947f (patch) | |
| tree | 622250f644c638340b77579aff16153a8f8e58ce /tests | |
| parent | b3d4c235f88fb14f0aa42c2704727a104ab33fd2 (diff) | |
improve check platform
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/projects/other/multiplats/src/main.c | 7 | ||||
| -rw-r--r-- | tests/projects/other/multiplats/test.lua | 8 | ||||
| -rw-r--r-- | tests/projects/other/multiplats/xmake.lua | 15 |
3 files changed, 30 insertions, 0 deletions
diff --git a/tests/projects/other/multiplats/src/main.c b/tests/projects/other/multiplats/src/main.c new file mode 100644 index 000000000..9ae580511 --- /dev/null +++ b/tests/projects/other/multiplats/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/projects/other/multiplats/test.lua b/tests/projects/other/multiplats/test.lua new file mode 100644 index 000000000..196797077 --- /dev/null +++ b/tests/projects/other/multiplats/test.lua @@ -0,0 +1,8 @@ +function main(t) + if is_host("macosx") then + os.exec("xmake f -c -vD") + os.exec("xmake -rvD") + os.exec("xmake f -c -vD -p iphoneos") + os.exec("xmake -rvD") + end +end diff --git a/tests/projects/other/multiplats/xmake.lua b/tests/projects/other/multiplats/xmake.lua new file mode 100644 index 000000000..e8fbbb372 --- /dev/null +++ b/tests/projects/other/multiplats/xmake.lua @@ -0,0 +1,15 @@ +add_rules("mode.debug", "mode.release") +target("test_host") + set_kind("binary") + add_files("src/*.c") + +target("test_iphoneos") + set_kind("binary") + add_files("src/*.c") + set_plat("iphoneos") + +target("test_iphoneos_armv7") + set_kind("binary") + add_files("src/*.c") + set_plat("iphoneos") + set_arch("armv7") |
