Merge lp:~widelands-dev/widelands/use_more_processors into lp:widelands

Proposed by kaputtnik
Status: Merged
Merged at revision: 8905
Proposed branch: lp:~widelands-dev/widelands/use_more_processors
Merge into: lp:widelands
Diff against target: 12 lines (+2/-1)
1 file modified
compile.sh (+2/-1)
To merge this branch: bzr merge lp:~widelands-dev/widelands/use_more_processors
Reviewer Review Type Date Requested Status
GunChleoc Approve
Review via email: mp+358020@code.launchpad.net

Commit message

Use more processing units when using the compile script. Defaults to: max. processors -1

Description of the change

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.

To post a comment you must log in.
Revision history for this message
bunnybot (widelandsofficial) wrote :

Continuous integration builds have changed state:

Travis build 4179. State: passed. Details: https://travis-ci.org/widelands/widelands/builds/448416745.
Appveyor build 3977. State: success. Details: https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_use_more_processors-3977.

Revision history for this message
GunChleoc (gunchleoc) wrote :

Thanks!

Tested on Windows with ninja and on Linux without ninja.

@bunnybot merge

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'compile.sh'
2--- compile.sh 2017-11-30 07:04:11 +0000
3+++ compile.sh 2018-10-30 14:45:28 +0000
4@@ -199,7 +199,8 @@
5 cmake .. -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DOPTION_BUILD_WEBSITE_TOOLS=$BUILD_WEBSITE -DOPTION_BUILD_TRANSLATIONS=$BUILD_TRANSLATIONS -DOPTION_ASAN=$USE_ASAN
6 fi
7
8- $buildtool
9+ $buildtool -j "$(nproc --ignore=1)"
10+
11 return 0
12 }
13

Subscribers

People subscribed via source and target branches

to status/vote changes: