diff options
| author | ruki <[email protected]> | 2020-03-12 23:19:20 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-03-12 13:56:05 +0800 |
| commit | c2788d5a76613175207dbf923de1d7e461329571 (patch) | |
| tree | 847d8255915765a964830b9372f5cf19dcdbb426 | |
| parent | fa57a2c846d6588256ec39123adb195baa31c419 (diff) | |
add jobs for autoconf
| -rw-r--r-- | xmake/modules/package/tools/autoconf.lua | 4 | ||||
| -rw-r--r-- | xmake/modules/package/tools/cmake.lua | 8 |
2 files changed, 9 insertions, 3 deletions
diff --git a/xmake/modules/package/tools/autoconf.lua b/xmake/modules/package/tools/autoconf.lua index 3dbc7853a..fc437d26c 100644 --- a/xmake/modules/package/tools/autoconf.lua +++ b/xmake/modules/package/tools/autoconf.lua @@ -19,6 +19,7 @@ -- -- imports +import("core.base.option") import("core.project.config") -- get configs @@ -163,6 +164,7 @@ function install(package, configs, opt) configure(package, configs, opt) -- do make and install - os.vrun("make install -j4") + os.vrun("make -j" .. option.get("jobs")) + os.vrun("make install") end diff --git a/xmake/modules/package/tools/cmake.lua b/xmake/modules/package/tools/cmake.lua index 2cabe6e87..c49c9b681 100644 --- a/xmake/modules/package/tools/cmake.lua +++ b/xmake/modules/package/tools/cmake.lua @@ -130,8 +130,12 @@ function install(package, configs, opt) os.cp("**.exp", package:installdir("lib")) end else - os.vrun("make -j4") - os.vrun("make install") + argv = {"-j" .. option.get("jobs")} + if option.get("verbose") then + table.insert(argv, "VERBOSE=1") + end + os.vrunv("make", argv) + os.vrunv("make", {"install"}) os.cp("install/lib", package:installdir()) os.cp("install/include", package:installdir()) end |
