widelands-dev team mailing list archive
-
widelands-dev team
-
Mailing list archive
-
Message #15173
[Merge] lp:~widelands-dev/widelands/use_more_processors into lp:widelands
kaputtnik has proposed merging lp:~widelands-dev/widelands/use_more_processors into lp:widelands.
Commit message:
Use more processing units when using the compile script. Defaults to: max. processors -1
Requested reviews:
Widelands Developers (widelands-dev)
For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/use_more_processors/+merge/358020
Reason for this change: https://wl.widelands.org/forum/topic/4362/?page=1#post-26418
The command nproc is part of gnu-coreutils: https://www.gnu.org/software/coreutils/manual/html_node/nproc-invocation.html#nproc-invocation
If only one processing unit is found, the command 'nproc --ignore=1' returns 1.
At least on linux the switch '-j ' is known to all compilers (gnu, clang and ninja). I have tested gnu and clang.
Maybe has to be tested on MacOs, if the compile script is used over there.
--
Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/use_more_processors into lp:widelands.
=== modified file 'compile.sh'
--- compile.sh 2017-11-30 07:04:11 +0000
+++ compile.sh 2018-10-30 14:45:28 +0000
@@ -199,7 +199,8 @@
cmake .. -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DOPTION_BUILD_WEBSITE_TOOLS=$BUILD_WEBSITE -DOPTION_BUILD_TRANSLATIONS=$BUILD_TRANSLATIONS -DOPTION_ASAN=$USE_ASAN
fi
- $buildtool
+ $buildtool -j "$(nproc --ignore=1)"
+
return 0
}
Follow ups