diff options
| author | ruki <[email protected]> | 2022-11-04 23:58:37 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-11-04 23:58:37 +0800 |
| commit | cd121fd4f8134fba82e6377e9c99c76d98c210e5 (patch) | |
| tree | 249f4882fa2e218534250dcc2f3e1f772f9f9c7f /xmake/rules/utils/ispc/ispc.lua | |
| parent | c33fd0e8124cf49e5397e46ff8b95ad1da715cb0 (diff) | |
Update ispc.lua
Diffstat (limited to 'xmake/rules/utils/ispc/ispc.lua')
| -rw-r--r-- | xmake/rules/utils/ispc/ispc.lua | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/xmake/rules/utils/ispc/ispc.lua b/xmake/rules/utils/ispc/ispc.lua index 66a1fe695..b1e924c65 100644 --- a/xmake/rules/utils/ispc/ispc.lua +++ b/xmake/rules/utils/ispc/ispc.lua @@ -6,10 +6,10 @@ rule("utils.ispc") os.mkdir(headersdir) target:add("includedirs", headersdir, {public = true}) end) + before_buildcmd_file(function (target, batchcmds, sourcefile_ispc, opt) import("lib.detect.find_tool") - local ispc = find_tool("ispc") - assert(ispc, "ispc not found!") + local ispc = assert(find_tool("ispc"), "ispc not found!") local flags = {} if target:values("ispc.flags") then @@ -43,7 +43,6 @@ rule("utils.ispc") local headersdir = path.join(target:autogendir(), "rules", "utils", "ispc", "headers") local objectfile = target:objectfile(sourcefile_ispc) local objectdir = path.directory(objectfile) - local headersfile local header_extension = target:extraconf("rules", "utils.ispc", "header_extension") if header_extension then @@ -57,7 +56,8 @@ rule("utils.ispc") table.insert(flags, "-h") table.insert(flags, path(headersfile)) table.insert(flags, path(sourcefile_ispc)) - batchcmds:show_progress(opt.progress, "${color.build.object}compiling %s", sourcefile_ispc) + + batchcmds:show_progress(opt.progress, "${color.build.object}compiling.ispc %s", sourcefile_ispc) batchcmds:mkdir(objectdir) batchcmds:vrunv(ispc.program, flags) @@ -66,4 +66,4 @@ rule("utils.ispc") batchcmds:add_depfiles(sourcefile_ispc, headersfile) batchcmds:set_depmtime(os.mtime(objectfile)) batchcmds:set_depcache(target:dependfile(objectfile)) - end)
\ No newline at end of file + end) |
