File: xmake.lua

package info (click to toggle)
workflow 0.11.11-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,756 kB
  • sloc: cpp: 33,895; ansic: 9,397; makefile: 9; sh: 6
file content (26 lines) | stat: -rw-r--r-- 559 bytes parent folder | download | duplicates (2)
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
set_group("benchmark")
set_default(false)

add_deps("workflow")

if not is_plat("macosx") then
    add_ldflags("-lrt")
end

function all_benchs()
    local res = {}
    for _, x in ipairs(os.files("**.cc")) do
        local item = {}
        local s = path.filename(x)
        table.insert(item, s:sub(1, #s - 3))       -- target
        table.insert(item, path.relative(x, "."))  -- source
        table.insert(res, item)
    end
    return res
end

for _, bench in ipairs(all_benchs()) do
target(bench[1])
    set_kind("binary")
    add_files(bench[2])
end