diff options
| author | ruki <[email protected]> | 2024-11-29 23:47:36 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-11-29 23:47:36 +0800 |
| commit | 2f1213a70b2ea1be2097c7f2bd7b4fc85a861b80 (patch) | |
| tree | 8e80ee15aac85d1e6714a288553fb08e94384f58 /tests/projects | |
| parent | 7c6fd15fb59da11c1d45e6c4fa33a96dfd801889 (diff) | |
| parent | d9220fbb1cad4e025094c52c3ee5deaf6dbb9d8f (diff) | |
Merge pull request #5901 from xmake-io/deps
Improve to package deps
Diffstat (limited to 'tests/projects')
4 files changed, 48 insertions, 2 deletions
diff --git a/tests/projects/package/compatibility/deps_with_version/src/main.c b/tests/projects/package/compatibility/deps_with_version/src/main.c new file mode 100755 index 000000000..113930e1a --- /dev/null +++ b/tests/projects/package/compatibility/deps_with_version/src/main.c @@ -0,0 +1,6 @@ +#include <stdio.h> + +int main(int argc, char** argv) { + printf("hello world!\n"); + return 0; +} diff --git a/tests/projects/package/compatibility/deps_with_version/test.lua b/tests/projects/package/compatibility/deps_with_version/test.lua new file mode 100644 index 000000000..a6690754b --- /dev/null +++ b/tests/projects/package/compatibility/deps_with_version/test.lua @@ -0,0 +1,10 @@ +function main(t) + -- freebsd ci is slower + if is_host("bsd") then + return + end + -- only for x86/x64, because it will take too long time on ci with arm/mips + if os.subarch():startswith("x") or os.subarch() == "i386" then + t:build() + end +end diff --git a/tests/projects/package/compatibility/deps_with_version/xmake.lua b/tests/projects/package/compatibility/deps_with_version/xmake.lua new file mode 100644 index 000000000..28adf5e7e --- /dev/null +++ b/tests/projects/package/compatibility/deps_with_version/xmake.lua @@ -0,0 +1,31 @@ +package("foo") + add_deps("zlib >=1.2.13") + set_policy("package.install_locally", true) + on_install(function () end) +package_end() + +package("bar") + add_deps("zlib 1.2.x") + set_policy("package.install_locally", true) +-- add_deps("libpng dev") + on_install(function () end) +package_end() + +package("zoo") + add_deps("libpng master") + set_policy("package.install_locally", true) + on_install(function () end) +package_end() + +package("test") + add_deps("foo", "bar", "zoo") + set_policy("package.install_locally", true) + on_install(function () end) +package_end() + +add_requires("test") + +target("test") + set_kind("binary") + add_files("src/*.c") + add_packages("test") diff --git a/tests/projects/package/depconfigs/src/main.c b/tests/projects/package/depconfigs/src/main.c index 9ae580511..113930e1a 100755 --- a/tests/projects/package/depconfigs/src/main.c +++ b/tests/projects/package/depconfigs/src/main.c @@ -1,7 +1,6 @@ #include <stdio.h> -int main(int argc, char** argv) -{ +int main(int argc, char** argv) { printf("hello world!\n"); return 0; } |
