Determine NCOMPPROCS automatically
This commit is contained in:
parent
9f102a08b6
commit
c262140556
2 changed files with 15 additions and 14 deletions
27
etc/bashrc
27
etc/bashrc
|
@ -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'
|
||||
|
@ -254,21 +255,21 @@ Darwin)
|
|||
# Use Mac-Ports-Compiler instead of Apple-gcc-4.2
|
||||
case $WM_COMPILER in
|
||||
Gcc43)
|
||||
export WM_CC='gcc-mp-4.3'
|
||||
export WM_CXX='g++-mp-4.3'
|
||||
;;
|
||||
export WM_CC='gcc-mp-4.3'
|
||||
export WM_CXX='g++-mp-4.3'
|
||||
;;
|
||||
Gcc44)
|
||||
export WM_CC='gcc-mp-4.4'
|
||||
export WM_CXX='g++-mp-4.4'
|
||||
;;
|
||||
export WM_CC='gcc-mp-4.4'
|
||||
export WM_CXX='g++-mp-4.4'
|
||||
;;
|
||||
Gcc45)
|
||||
export WM_CC='gcc-mp-4.5'
|
||||
export WM_CXX='g++-mp-4.5'
|
||||
;;
|
||||
export WM_CC='gcc-mp-4.5'
|
||||
export WM_CXX='g++-mp-4.5'
|
||||
;;
|
||||
*)
|
||||
export WM_COMPILER=
|
||||
;;
|
||||
esac
|
||||
export WM_COMPILER=
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
;;
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Reference in a new issue