mirror of
https://github.com/sogou/workflow.git
synced 2026-02-08 01:33:17 +08:00
feat : xmake add valgrind
This commit is contained in:
@@ -33,4 +33,12 @@ for _, test in ipairs(all_tests()) do
|
||||
target(test[1])
|
||||
set_kind("binary")
|
||||
add_files(test[2])
|
||||
if has_config("memcheck") then
|
||||
on_run(function (target)
|
||||
local argv = {}
|
||||
table.insert(argv, target:targetfile())
|
||||
table.insert(argv, "--leak-check=full")
|
||||
os.execv("valgrind", argv)
|
||||
end)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -8,6 +8,7 @@ option("consul", {description = "build consul component", default = true}
|
||||
option("mysql", {description = "build mysql component", default = true})
|
||||
option("redis", {description = "build redis component", default = true})
|
||||
option("upstream", {description = "build upstream component", default = true})
|
||||
option("memcheck", {description = "valgrind memcheck", default = false})
|
||||
|
||||
add_rules("mode.release", "mode.debug")
|
||||
set_languages("c90", "c++11")
|
||||
|
||||
Reference in New Issue
Block a user