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

Proposed by Toni Förster
Status: Merged
Merged at revision: 8908
Proposed branch: lp:~widelands-dev/widelands/number_of_cpus
Merge into: lp:widelands
Diff against target: 16 lines (+5/-1)
1 file modified
compile.sh (+5/-1)
To merge this branch: bzr merge lp:~widelands-dev/widelands/number_of_cpus
Reviewer Review Type Date Requested Status
GunChleoc Approve
Review via email: mp+358352@code.launchpad.net

Commit message

correctly calculate the number of cpus on macOS

Description of the change

This does not fix the linked bug-report but it counts the cpus correctly on macOS.

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

Thanks!

@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 2018-10-30 14:04:11 +0000
3+++ compile.sh 2018-11-05 22:35:57 +0000
4@@ -199,7 +199,11 @@
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 -j "$(nproc --ignore=1)"
9+ if [ $(uname) == "Darwin" ]; then
10+ $buildtool -j "$(expr $(sysctl -n hw.ncpu) - 1)"
11+ else
12+ $buildtool -j "$(nproc --ignore=1)"
13+ fi
14
15 return 0
16 }

Subscribers

People subscribed via source and target branches

to status/vote changes: