summaryrefslogtreecommitdiff
path: root/tests/projects/package
diff options
context:
space:
mode:
authorruki <[email protected]>2021-02-04 22:50:04 +0800
committerruki <[email protected]>2021-02-04 22:50:04 +0800
commit21f54de18ca93ef952e5c5711fa491330cf9f49f (patch)
tree7ca2ab9a95c2021ad6c494802b7edc4212498b33 /tests/projects/package
parentb90547ab8d1436d268b09ec424df3069d77ecb35 (diff)
add packages toolchain
Diffstat (limited to 'tests/projects/package')
-rw-r--r--tests/projects/package/toolchain_gnu_rm/xmake.lua2
-rw-r--r--tests/projects/package/toolchain_llvm_mingw/xmake.lua2
-rw-r--r--tests/projects/package/toolchain_muslcc/src/main.c2
-rw-r--r--tests/projects/package/toolchain_muslcc/xmake.lua13
-rw-r--r--tests/projects/package/toolchain_zig/xmake.lua4
5 files changed, 16 insertions, 7 deletions
diff --git a/tests/projects/package/toolchain_gnu_rm/xmake.lua b/tests/projects/package/toolchain_gnu_rm/xmake.lua
index 712114dbe..d00bc859c 100644
--- a/tests/projects/package/toolchain_gnu_rm/xmake.lua
+++ b/tests/projects/package/toolchain_gnu_rm/xmake.lua
@@ -4,4 +4,4 @@ add_requires("gnu-rm")
target("test")
set_kind("binary")
add_files("src/*.c")
- set_toolchains("gnu-rm", {packages = "gnu-rm"})
+ set_toolchains("gnu-rm")
diff --git a/tests/projects/package/toolchain_llvm_mingw/xmake.lua b/tests/projects/package/toolchain_llvm_mingw/xmake.lua
index 0cb0d01b9..0373bd96b 100644
--- a/tests/projects/package/toolchain_llvm_mingw/xmake.lua
+++ b/tests/projects/package/toolchain_llvm_mingw/xmake.lua
@@ -4,4 +4,4 @@ add_requires("llvm-mingw")
target("test")
set_kind("binary")
add_files("src/*.c")
- set_toolchains("mingw", {packages = "llvm-mingw"})
+ set_toolchains("mingw")
diff --git a/tests/projects/package/toolchain_muslcc/src/main.c b/tests/projects/package/toolchain_muslcc/src/main.c
index c8b1209a0..9ec3e9c6d 100644
--- a/tests/projects/package/toolchain_muslcc/src/main.c
+++ b/tests/projects/package/toolchain_muslcc/src/main.c
@@ -1,9 +1,11 @@
#include <stdio.h>
#include <zlib.h>
+#include <pcre2.h>
int main(int argc, char** argv)
{
printf("hello world!\n");
inflate(0, 0);
+ pcre2_compile(0, 0, 0, 0, 0, 0);
return 0;
}
diff --git a/tests/projects/package/toolchain_muslcc/xmake.lua b/tests/projects/package/toolchain_muslcc/xmake.lua
index 4b4904427..9bfa0de28 100644
--- a/tests/projects/package/toolchain_muslcc/xmake.lua
+++ b/tests/projects/package/toolchain_muslcc/xmake.lua
@@ -1,9 +1,16 @@
add_rules("mode.debug", "mode.release")
+
+-- set muslcc as global toolchain
add_requires("muslcc")
-add_requires("zlib")
+set_toolchains("muslcc")
+
+-- explicitly specify the package toolchain
+add_requires("zlib", {configs = {toolchains = "muslcc"}})
+
+-- use global toolchain: muslcc
+add_requires("pcre2")
target("test")
set_kind("binary")
add_files("src/*.c")
- add_packages("zlib")
- set_toolchains("muslcc", {packages = "muslcc"})
+ add_packages("zlib", "pcre2")
diff --git a/tests/projects/package/toolchain_zig/xmake.lua b/tests/projects/package/toolchain_zig/xmake.lua
index c08fdca16..095e2cba0 100644
--- a/tests/projects/package/toolchain_zig/xmake.lua
+++ b/tests/projects/package/toolchain_zig/xmake.lua
@@ -3,5 +3,5 @@ add_requires("zig 0.7.x")
target("test")
set_kind("binary")
- add_files("src/*.zig")
- set_toolchains("zig", {packages = "zig"})
+ add_files("src/*.zig") -- we use builtin zig toolchain
+