wxWidgets/build/tools/proc_count.sh
Vadim Zeitlin a1f29366f0 Detect the number of CPUs under FreeBSD too
This is under done using exactly the same command as under macOS,
unsurprisingly.
2022-06-23 15:26:36 +01:00

19 lines
300 B
Bash
Executable File

# This script outputs the number of available processors/cores plus one.
case `uname` in
Linux)
wxPROC_COUNT=`nproc`
;;
Darwin|FreeBSD)
wxPROC_COUNT=`sysctl -n hw.ncpu`
;;
*)
wxPROC_COUNT=0
;;
esac
((wxPROC_COUNT++))
echo $wxPROC_COUNT