-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
xmake.lua
40 lines (32 loc) · 924 Bytes
/
xmake.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
set_project("NazaraUtils")
add_rules("mode.coverage", "mode.debug", "mode.releasedbg", "mode.release")
add_rules("plugin.vsxmake.autoupdate")
-- Sanitizers
local sanitizers = {
asan = "address",
lsan = "leak",
tsan = "thread",
}
for opt, policy in table.orderpairs(sanitizers) do
option(opt, { description = "Enable " .. opt, default = false })
if has_config(opt) then
set_policy("build.sanitizer." .. policy, true)
end
end
add_includedirs("include")
set_exceptions("cxx")
set_languages("c89", "cxx17")
set_rundir("./bin/$(plat)_$(arch)_$(mode)")
set_targetdir("./bin/$(plat)_$(arch)_$(mode)")
set_warnings("allextra")
if is_mode("debug") then
add_defines("NAZARA_DEBUG")
end
target("NazaraUtils", function ()
set_kind("headeronly")
set_group("Library")
add_headerfiles("include/(NazaraUtils/**.hpp)")
add_headerfiles("include/(NazaraUtils/**.inl)")
end)
includes("bench/*.lua")
includes("tests/*.lua")