diff options
| author | ruki <[email protected]> | 2025-04-09 22:09:38 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-04-09 22:09:38 +0800 |
| commit | 48275f817475b398b649f55054e2e60200dcd052 (patch) | |
| tree | 2e943d22fd4adceb8f0c6e53dbee610ce217f7c3 /xmake/rules/cppfront/xmake.lua | |
| parent | d9a5ab70746010c846b815c2b5e14447d268b96f (diff) | |
| parent | 699e40f3e45469b3597f5fa24ad6bb2c922b8a4b (diff) | |
Merge pull request #6209 from xmake-io/prepare
Add build jobgraph support
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 |
