diff options
| author | ruki <[email protected]> | 2025-04-05 22:15:27 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2025-04-08 15:31:57 +0800 |
| commit | ca185a3cc835182a9c290bc53bfec505abd60833 (patch) | |
| tree | 7b5c8ff7cb63a8594157f23973363b47a65301cf /xmake/rules/cppfront/xmake.lua | |
| parent | 529f59f911ddba8a2ef015f50df7a9582dd2bdb4 (diff) | |
update order opt
Diffstat (limited to 'xmake/rules/cppfront/xmake.lua')
| -rw-r--r-- | xmake/rules/cppfront/xmake.lua | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/xmake/rules/cppfront/xmake.lua b/xmake/rules/cppfront/xmake.lua index 22663f184..772c59487 100644 --- a/xmake/rules/cppfront/xmake.lua +++ b/xmake/rules/cppfront/xmake.lua @@ -22,7 +22,6 @@ rule("cppfront.build.h2") set_extensions(".h2") 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!") @@ -42,12 +41,11 @@ rule("cppfront.build.h2") batchcmds:set_depcache(target:dependfile(sourcefile_h)) end) --- define rule: cppfront.build rule("cppfront.build.cpp2") set_extensions(".cpp2") -- .h2 must compile before .cpp2 - add_deps("cppfront.build.h2", {order = true}) + add_orders("cppfront.build.h2", "cppfront.build.cpp2") on_load(function (target) -- only cppfront source files? we need to patch cxx source kind for linker @@ -64,7 +62,6 @@ rule("cppfront.build.cpp2") end end) on_buildcmd_file(function (target, batchcmds, sourcefile_cpp2, opt) - -- get cppfront import("lib.detect.find_tool") local cppfront = assert(find_tool("cppfront", {check = "-h"}), "cppfront not found!") @@ -84,6 +81,7 @@ rule("cppfront.build.cpp2") batchcmds:add_depfiles(path.join(root_dir, match_h2)) end end + -- add commands local argv = {"-o", path(sourcefile_cpp), path(sourcefile_cpp2)} batchcmds:show_progress(opt.progress, "${color.build.object}compiling.cpp2 %s", sourcefile_cpp2) @@ -97,14 +95,9 @@ rule("cppfront.build.cpp2") batchcmds:set_depcache(target:dependfile(objectfile)) end) - -- define rule: cppfront rule("cppfront") - - -- add_build.h2 rules add_deps("cppfront.build.h2") - - -- add build rules add_deps("cppfront.build.cpp2") -- set compiler runtime, e.g. vs runtime |
