-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathxmake.lua
More file actions
47 lines (40 loc) · 1.33 KB
/
xmake.lua
File metadata and controls
47 lines (40 loc) · 1.33 KB
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
41
42
43
44
45
46
add_rules("mode.debug", "mode.release")
set_languages("c++20")
function project(config)
target(config.projectname)
set_kind(config.kind)
set_targetdir(config.targetdir)
add_files(config.files)
add_includedirs(config.includedirs)
add_links(config.links)
add_linkdirs(config.linkdirs)
if config.deps ~= nil then
add_deps(config.deps)
end
if is_mode("release") then
set_optimize("fastest")
if is_plat("windows") then
set_runtimes("MD")
add_cxflags("/Zi", "/W0", "/MP", "/Ob2", "/Oi", "/Ot", "/Oy", "/GT", "/GF", "/GS-", "/Gy", "/arch:AVX2",
"/fp:precise", "/Gr", "/TP", "/Zc:preprocessor", {
force = true
})
end
else
set_optimize("none")
if is_plat("windows") then
set_runtimes("MDd")
add_cxflags("/Zi", "/W0", "/MP", "/Ob0", "/Oy-", "/GF", "/GS", "/arch:AVX2", "/fp:precise", "/Gr", "/TP",
"/Zc:preprocessor", {
force = true
})
end
end
end
project({
projectname = "cpp",
kind = "binary",
targetdir = "target",
files = {"src/*.cpp"},
includedirs = {"ext", "include"},
})