add linkjobs

pull/463/head
ruki 4 years ago
parent b9b9c3a2b9
commit 14329ee609
No known key found for this signature in database
GPG Key ID: D7C5BF5691071C8D
  1. 2
      packages/l/libogg/xmake.lua
  2. 4
      scripts/test.lua

@ -18,7 +18,7 @@ package("libogg")
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF"))
table.insert(configs, "-DCMAKE_POSITION_INDEPENDENT_CODE=ON")
import("package.tools.cmake").install(package, configs)
import("package.tools.cmake").install(package, configs, {cmake_generator = "Ninja"})
end)
on_test(function (package)

@ -14,6 +14,7 @@ local options =
, {'a', "arch", "kv", nil, "Set the given architecture." }
, {'m', "mode", "kv", nil, "Set the given mode." }
, {'j', "jobs", "kv", nil, "Set the build jobs." }
, {nil, "linkjobs", "kv", nil, "Set the link jobs." }
, {nil, "cflags", "kv", nil, "Set the cflags." }
, {nil, "cxxflags", "kv", nil, "Set the cxxflags." }
, {nil, "ldflags", "kv", nil, "Set the ldflags." }
@ -90,6 +91,9 @@ function _require_packages(argv, packages)
if argv.jobs then
table.insert(require_argv, "--jobs=" .. argv.jobs)
end
if argv.linkjobs then
table.insert(require_argv, "--linkjobs=" .. argv.linkjobs)
end
if argv.mode == "debug" and argv.kind == "shared" then
table.insert(require_argv, "--extra={debug=true,configs={shared=true}}")
elseif argv.mode == "debug" then

Loading…
Cancel
Save