Browse Source

add linkjobs

ruki 4 years ago
parent
commit
14329ee609
2 changed files with 5 additions and 1 deletions
  1. 1 1
      packages/l/libogg/xmake.lua
  2. 4 0
      scripts/test.lua

+ 1 - 1
packages/l/libogg/xmake.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)

+ 4 - 0
scripts/test.lua

@@ -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