diff options
| author | fasiondog <[email protected]> | 2022-01-09 16:13:31 +0800 |
|---|---|---|
| committer | fasiondog <[email protected]> | 2022-01-09 16:13:31 +0800 |
| commit | 80e1bd8df356ab25802e518bac38aff7dfe45702 (patch) | |
| tree | fc8d3d7d618368a2e5fbdab88ed6a0ea9fc273ed /xmake/modules/package/tools/ninja.lua | |
| parent | 187da27473c69bd9d7b0009d8d689ec924f16dfb (diff) | |
Improve cmake.tool, make and ninja supports the specified target
Diffstat (limited to 'xmake/modules/package/tools/ninja.lua')
| -rw-r--r-- | xmake/modules/package/tools/ninja.lua | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/xmake/modules/package/tools/ninja.lua b/xmake/modules/package/tools/ninja.lua index e16731670..0d3ad9708 100644 --- a/xmake/modules/package/tools/ninja.lua +++ b/xmake/modules/package/tools/ninja.lua @@ -28,7 +28,12 @@ function build(package, configs, opt) local buildir = opt.buildir or os.curdir() local njob = opt.jobs or option.get("jobs") or tostring(os.default_njob()) local ninja = assert(find_tool("ninja"), "ninja not found!") - local argv = {"-C", buildir} + local argv = {} + if opt.target then + table.insert(argv, opt.target) + end + table.insert(argv, "-C") + table.insert(argv, buildir) if option.get("verbose") then table.insert(argv, "-v") end |
