mirror of
https://github.com/shadps4-emu/ext-cryptopp.git
synced 2025-02-17 11:58:01 +00:00
Fixed OS X cpu detection
This commit is contained in:
parent
a7e08c7e84
commit
df1f68da84
@ -187,7 +187,7 @@ CPU=1
|
||||
MEM=1024
|
||||
|
||||
if [ "$IS_DARWIN" -ne "0" ]; then
|
||||
CPU=$(sysctl -a | grep 'hw.availcpu' | head -1 | awk '{print $2}')
|
||||
CPU=$(sysctl -a | grep 'hw.availcpu' | head -1 | awk '{print $3}')
|
||||
MEM=$(sysctl -a | grep 'hw.memsize' | head -1 | awk '{print $3}')
|
||||
MEM=$(($MEM/1024))
|
||||
fi
|
||||
@ -196,8 +196,11 @@ if [ "$IS_LINUX" -ne "0" ]; then
|
||||
MEM=$(cat /proc/meminfo | grep "MemTotal" | awk '{print $2}')
|
||||
fi
|
||||
|
||||
if [ "$CPU" -ge "2" ] && [ "$MEM" -ge "2097152" ] ; then
|
||||
MAKEARGS=(-j $CPU)
|
||||
echo "CPU: $CPU"
|
||||
echo "MEM: $MEM"
|
||||
|
||||
if [ "$CPU" -ge "2" ] && [ "$MEM" -ge "2097152" ]; then
|
||||
MAKEARGS=(-j "$CPU")
|
||||
fi
|
||||
|
||||
############################################
|
||||
|
Loading…
x
Reference in New Issue
Block a user