summaryrefslogtreecommitdiff
path: root/tests/projects/rust/static_library/xmake.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2018-04-28 00:47:39 +0800
committerruki <[email protected]>2018-04-27 22:45:56 +0800
commit119dd6ff5786ef7a390b98b0558554029113f0dd (patch)
tree2fa5d1196a8951c0f8e4ad67c8b443b47280a0ab /tests/projects/rust/static_library/xmake.lua
parent7d486e88c2b3301449974e0e97168bc0f0fd6c64 (diff)
add wdk tests
Diffstat (limited to 'tests/projects/rust/static_library/xmake.lua')
-rw-r--r--tests/projects/rust/static_library/xmake.lua48
1 files changed, 48 insertions, 0 deletions
diff --git a/tests/projects/rust/static_library/xmake.lua b/tests/projects/rust/static_library/xmake.lua
new file mode 100644
index 000000000..d665e86e9
--- /dev/null
+++ b/tests/projects/rust/static_library/xmake.lua
@@ -0,0 +1,48 @@
+-- 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("interfaces")
+
+ -- set kind
+ set_kind("static")
+
+ -- add files
+ add_files("src/interfaces.rs")
+
+-- add target
+target("test")
+
+ -- set kind
+ set_kind("binary")
+
+ -- add deps
+ add_deps("interfaces")
+
+ -- add files
+ add_files("src/main.rs")
+
+ -- add link directory
+ add_linkdirs("$(buildir)/$(mode)/$(arch)")
+
+