diff options
| author | carols <[email protected]> | 2024-04-09 12:07:47 +0800 |
|---|---|---|
| committer | carols <[email protected]> | 2024-04-09 12:07:47 +0800 |
| commit | ce5259b8ef77f1bb8ad983abc2d4a4392bd6f6ea (patch) | |
| tree | b02292ae8f967abb2e15f290a5c7296b43285e54 /xmake/rules | |
| parent | eec7b3465a4d80529a907182183e11261c3c12d5 (diff) | |
h2 changed use on_buildcmd_file, string.match(line -> line:match
Diffstat (limited to 'xmake/rules')
| -rw-r--r-- | xmake/rules/cppfront/xmake.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/xmake/rules/cppfront/xmake.lua b/xmake/rules/cppfront/xmake.lua index b2d0b093e..8803a7a38 100644 --- a/xmake/rules/cppfront/xmake.lua +++ b/xmake/rules/cppfront/xmake.lua @@ -21,7 +21,7 @@ rule("cppfront.build.h2") set_extensions(".h2") - before_buildcmd_file(function (target, batchcmds, sourcefile_h2, opt) + on_buildcmd_file(function (target, batchcmds, sourcefile_h2, opt) -- get cppfront import("lib.detect.find_tool") local cppfront = assert(find_tool("cppfront", {check = "-h"}), "cppfront not found!") @@ -79,7 +79,7 @@ rule("cppfront.build.cpp2") -- add_depfiles for #include "xxxx/xxxx/xxx.h2" ,exclude // #include "xxxx.h2" local lines = io.lines(sourcefile_cpp2) for line in lines do - match_h2 = string.match(line, "^ -#include *\"([%w%p]+.h2)\"") + match_h2 = line:match("^ -#include *\"([%w%p]+.h2)\"") if match_h2 ~= nil then batchcmds:add_depfiles(path.join(path.directory(sourcefile_cpp2), match_h2)) end |
