MRG: merged develop line back into integration branch

This commit is contained in:
Andrew Heather
2017-05-18 11:11:12 +01:00
514 changed files with 12134 additions and 16093 deletions

View File

@ -158,7 +158,15 @@ canBuildPlugin()
return 1
}
type cmake > /dev/null 2>&1 || {
[ -d "$ParaView_INCLUDE_DIR" ] && \
[ -f "$ParaView_INCLUDE_DIR/pqServerManagerModel.h" ] || {
echo "==> cannot build ParaView plugins without an include directory"
echo " ... or without GUI support"
echo " ParaView_INCLUDE_DIR=$ParaView_INCLUDE_DIR"
return 1
}
command -v cmake > /dev/null 2>&1 || {
echo "==> cannot build ParaView plugins without cmake"
return 1
}

View File

@ -161,7 +161,7 @@ then
# Second pass: clean up object directories with WM_PROJECT_DIR that don't
# have respective source code folders, along with the respective binaries
if [ "$(expandPath $PWD)" = "$WM_PROJECT_DIR" ]
if [ "$(expandPath $PWD)" = "$(expandPath $WM_PROJECT_DIR)" ]
then
objectsDir=$(findObjectDir $PWD 2>/dev/null) || exit 1 # Fatal

View File

@ -100,25 +100,18 @@ USAGE
exit 1
}
# Default make is the "make" in the path
make="make"
#------------------------------------------------------------------------------
# Set WM_NCOMPPROCS to number of cores on local machine
#------------------------------------------------------------------------------
useAllCores()
# Set nCores to the number of cores on the local machine
nCores=0
allCores()
{
if [ -r /proc/cpuinfo ]
then
WM_NCOMPPROCS=$(egrep "^processor" /proc/cpuinfo | wc -l)
else
WM_NCOMPPROCS=1
fi
export WM_NCOMPPROCS
nCores=$(egrep -c "^processor" /proc/cpuinfo 2>/dev/null) || nCores=1
: ${nCores:=1}
}
@ -145,11 +138,17 @@ do
-q | -queue | queue)
all=queue
;;
# Parallel compilation on all cores of local machine
# Parallel compilation on all cores (or specified number of cores)
-j)
useAllCores
nCores=0
test $# -ge 2 && expr $2 + 1 > /dev/null 2>&1 \
&& shift && export WM_NCOMPPROCS=$1
&& shift && nCores=$1
if [ "$nCores" = 0 ]
then
allCores
fi
export WM_NCOMPPROCS=$nCores
echo "Compiling enabled on $WM_NCOMPPROCS cores"
;;
# Parallel compilation on specified number of cores
@ -214,8 +213,7 @@ checkEnv
# Set WM_NCOMPPROCS automatically when both WM_HOSTS and WM_SCHEDULER are set
if [ -z "$WM_NCOMPPROCS" -a -n "$WM_HOSTS" -a -n "$WM_SCHEDULER" ]
then
WM_NCOMPPROCS=$(wmakeScheduler -count)
[ $? -eq 0 ] || unset WM_NCOMPPROCS
WM_NCOMPPROCS=$(wmakeScheduler -count) || unset WM_NCOMPPROCS
fi
if [ -n "$WM_NCOMPPROCS" ]
@ -348,8 +346,8 @@ then
export WM_COLLECT_DIR=$WM_PROJECT_DIR/build/${WM_OPTIONS}/${PWD////_}
export WM_SCHEDULER=wmakeCollect
trap '$WM_SCHEDULER -kill' TERM INT
$WM_SCHEDULER -clean \
&& wmake -all objects \
$WM_SCHEDULER -clean \
&& wmake -all objects \
&& $WM_SCHEDULER
) && wmake -all
exit $?

View File

@ -29,7 +29,7 @@
# wmakeLnIncludeAll [dir1 .. dirN]
#
# Description
# Find directories with a 'Make/files' that contains a 'LIB =' directive
# Find directories with a 'Make/files' containing a 'LIB =' directive
# and execute 'wmakeLnInclude' for each one
#
#------------------------------------------------------------------------------
@ -46,7 +46,7 @@ options:
-jN or -j N Compile using N cores/hyperthreads
-h | -help Print the usage
Find directories with a 'Make/files' that contains a 'LIB =' directive
Find directories with a 'Make/files' containing a 'LIB =' directive
and execute 'wmakeLnInclude -update' for each one
USAGE
@ -78,6 +78,11 @@ do
nCores=${WM_NCOMPPROCS:-0}
test $# -ge 2 && expr $2 + 1 > /dev/null 2>&1 \
&& shift && nCores=$1
if [ "$nCores" = 0 ]
then
nCores=1
fi
;;
# Parallel compilation on specified number of cores
-j[1-9]*)
@ -93,6 +98,18 @@ do
shift
done
# Default search is from CWD, with special handling of the top-level
# project directory: {applications,src} directories
if [ "$#" -eq 0 ]
then
if wmakeCheckPwd "$WM_PROJECT_DIR" 2>/dev/null
then
set -- applications src
else
set -- .
fi
fi
if [ "$nCores" -gt 0 ]
then
echo "$Script: starting wmakeLnInclude processes on $nCores cores"
@ -100,10 +117,6 @@ else
echo "$Script: running wmakeLnInclude"
fi
# Defaults to searching from CWD
[ "$#" -gt 0 ] || set -- .
for checkDir
do
if [ -d $checkDir ]
@ -114,7 +127,7 @@ do
continue
fi
find $checkDir -depth -type d -name Make -print | while read MakeDir
find $checkDir -depth -name Make -type d -print | while read MakeDir
do
topDir=${MakeDir%/Make} # trim /Make from the end
if [ -d "$topDir" ]