-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathxmake.lua
61 lines (55 loc) · 1.3 KB
/
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
add_rules("mode.debug", "mode.release")
add_rules("plugin.compile_commands.autoupdate", {outputdir = "."})
includes("./libs")
add_requires(
"spdlog",
"tl_expected",
"tl_optional",
"endian",
"doctest",
"mimalloc"
)
target("toocal_core")
set_kind("static")
set_languages("c++20")
add_files("core/*.cpp")
add_includedirs("libs")
add_packages(
"spdlog",
"tl_expected",
"tl_optional",
"endian",
"mimalloc"
)
add_links("mimalloc")
target("toocal")
set_kind("binary")
set_languages("c++20")
add_files("cli/*.cpp")
add_includedirs("core", "libs")
add_deps("toocal_core")
add_packages(
"spdlog",
"tl_expected",
"tl_optional",
"endian"
)
add_links("toocal_core", "mimalloc")
for _, file in ipairs(os.files("tests/test_*.cpp")) do
local name = path.basename(file)
target(name)
set_kind("binary")
set_default(false)
set_languages("c++20")
add_files("tests/" .. name .. ".cpp")
add_tests(name)
add_deps("toocal_core")
add_includedirs("core", "libs")
add_packages(
"spdlog",
"tl_expected",
"tl_optional",
"endian"
)
add_links("mimalloc")
end