summaryrefslogtreecommitdiff
path: root/tests/projects
diff options
context:
space:
mode:
authorruki <[email protected]>2021-11-13 13:23:21 +0800
committerruki <[email protected]>2021-11-13 13:23:21 +0800
commit8907c57014dedbd68da377cb25a92096c0c713d8 (patch)
tree07394e7ab879c840203343fc0914163463c258d8 /tests/projects
parentdaef54e8a91ae742e18057756fcaa7548bc83930 (diff)
add find_package for cargo
Diffstat (limited to 'tests/projects')
-rw-r--r--tests/projects/rust/cargo_deps/src/main.rs1
-rw-r--r--tests/projects/rust/cxx_call_rust_library/xmake.lua3
2 files changed, 4 insertions, 0 deletions
diff --git a/tests/projects/rust/cargo_deps/src/main.rs b/tests/projects/rust/cargo_deps/src/main.rs
index 92a120ec9..f1ec987bf 100644
--- a/tests/projects/rust/cargo_deps/src/main.rs
+++ b/tests/projects/rust/cargo_deps/src/main.rs
@@ -8,4 +8,5 @@ fn main() {
assert_eq!(encode(a), b);
assert_eq!(a, &decode(b).unwrap()[..]);
+ println!("{}", encode(a));
}
diff --git a/tests/projects/rust/cxx_call_rust_library/xmake.lua b/tests/projects/rust/cxx_call_rust_library/xmake.lua
index fb3a48171..30d54cc02 100644
--- a/tests/projects/rust/cxx_call_rust_library/xmake.lua
+++ b/tests/projects/rust/cxx_call_rust_library/xmake.lua
@@ -1,9 +1,12 @@
add_rules("mode.debug", "mode.release")
+add_requires("cargo::cxx 1.0")
+
target("foo")
set_kind("static")
add_files("src/foo.rs")
set_values("rust.cratetype", "staticlib")
+ add_packages("cargo::cxx")
target("test")
set_kind("binary")