-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathxmake.lua
More file actions
executable file
·37 lines (30 loc) · 1008 Bytes
/
xmake.lua
File metadata and controls
executable file
·37 lines (30 loc) · 1008 Bytes
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
set_policy("package.requires_lock", true)
set_policy("package.precompiled", false)
includes("xmake/*.lua")
add_rules("mode.debug", "mode.release", "mode.releasedbg", "mode.valgrind")
add_rules("plugin.compile_commands.autoupdate", { outputdir = ".", lsp = "clangd" })
set_project("Lorr")
set_version("1.0.0")
-- GLOBAL COMPILER FLAGS --
set_encodings("utf-8")
add_cxxflags("cl::/Zc:preprocessor")
-- WARNINGS --
set_warnings("allextra", "pedantic")
add_cxxflags(
"-Wshadow",
"-Wno-gnu-line-marker",
"-Wno-gnu-anonymous-struct",
"-Wno-gnu-zero-variadic-macro-arguments",
"-Wno-missing-braces",
{ tools = { "clang", "gcc" } })
add_cxxflags("clang::-Wshadow-all")
if is_mode("asan") then
set_policy("build.sanitizer.address", true)
set_policy("build.sanitizer.undefined", true)
set_policy("build.sanitizer.leak", true)
elseif is_mode("tsan") then
set_policy("build.sanitizer.thread", true)
set_optimize("faster")
-- add_cxxflags("-g")
end
includes("Lorr")