Determine NCOMPPROCS automatically

This commit is contained in:
Henrik Rusche 2013-07-05 17:15:35 +02:00
parent 9f102a08b6
commit c262140556
2 changed files with 15 additions and 14 deletions

View file

@ -128,7 +128,7 @@ export WM_COMPILER_LIB_ARCH=
# Compilation options (architecture, precision, optimised, debug or profiling)
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
: ${WM_NCOMPPROCS:=2}; export WM_NCOMPPROCS
: ${WM_NCOMPPROCS:=`grep -c processor /proc/cpuinfo`}; export WM_NCOMPPROCS
# WM_ARCH_OPTION = 32 | 64
: ${WM_ARCH_OPTION:=64}; export WM_ARCH_OPTION
@ -227,6 +227,7 @@ Darwin)
export WM_ARCH=darwinUnknown
;;
esac
case $WM_ARCH_OPTION in
32)
export WM_CFLAGS='-m32 -fPIC'

View file

@ -119,7 +119,7 @@ setenv WM_COMPILER_LIB_ARCH
# Compilation options (architecture, precision, optimised, debug or profiling)
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
setenv WM_NCOMPPROCS 4
if ( ! $?WM_NCOMPPROCS ) setenv WM_NCOMPPROCS=`grep -c processor /proc/cpuinfo`
# WM_ARCH_OPTION = 32 | 64
if ( ! $?WM_ARCH_OPTION ) setenv WM_ARCH_OPTION 64