add valgrind
This commit is contained in:
@@ -13,6 +13,8 @@ if is_mode("release") then
|
||||
set_warnings("all", "error")
|
||||
end
|
||||
|
||||
option("valgrind", {description = "Run binary with valgrind", default = false})
|
||||
|
||||
target("Tower-Defense2")
|
||||
add_includedirs("include", {public = true})
|
||||
set_kind("binary")
|
||||
@@ -21,6 +23,11 @@ target("Tower-Defense2")
|
||||
set_rundir(".")
|
||||
add_defines("TD_GL_LOADER_GLEW")
|
||||
|
||||
if has_config("valgrind") then
|
||||
on_run(function (target)
|
||||
os.execv("valgrind", {"-s", "--leak-check=full", target:targetfile()})
|
||||
end)
|
||||
end
|
||||
|
||||
|
||||
-- Tests
|
||||
|
||||
Reference in New Issue
Block a user