Commit 2f07de03 authored by Mark Olesen's avatar Mark Olesen
Browse files

COMP: add -pthread for AMD compiler rule

- https://github.com/spack/spack/pull/27949

COMP: respect FOAM_BUILDROOT for wmake -queue

STYLE: fix stray paraview setting
parent b632e7b5
......@@ -70,15 +70,16 @@ applications/Allwmake $targetType $*
# Additional components/modules
if [ "$FOAM_MODULE_PREFIX" = false ] || [ "$FOAM_MODULE_PREFIX" = none ]
then
case "$FOAM_MODULE_PREFIX" in
(false | none)
echo ========================================
echo "OpenFOAM modules disabled (prefix=${FOAM_MODULE_PREFIX})"
echo
else
;;
(*)
# Use wmake -all instead of Allwmake to allow for overrides
(cd "$WM_PROJECT_DIR/modules" 2>/dev/null && wmake -all)
fi
( cd "$WM_PROJECT_DIR/modules" 2>/dev/null && wmake -all )
esac
# Count files in given directory. Ignore "Test-*" binaries.
_foamCountDirEntries()
......
......@@ -169,7 +169,7 @@ default:
endsw
foreach libDir ("lib$WM_COMPILER_LIB_ARCH" "lib")
if ( -d "${qtDir}/${libDir}" ) then
set pv_libdirs="${qtDir}/${libDir}:${pv_libdirs}"
set pv_libdirs="${qtDir}/${libDir}"
break
endif
end
......
......@@ -12,12 +12,12 @@ targetType=libso
export FOAM_MODULE_PREFIX
echo "========================================"
if [ "$FOAM_MODULE_PREFIX" = false ] || [ "$FOAM_MODULE_PREFIX" = none ]
then
case "$FOAM_MODULE_PREFIX" in
(false | none)
echo "OpenFOAM modules disabled (prefix=${FOAM_MODULE_PREFIX})"
echo
exit 0
fi
esac
echo "prefix = $FOAM_MODULE_PREFIX"
echo
......@@ -33,6 +33,7 @@ for moduleName in $(./list-modules)
do
if [ -d "$moduleName" ]
then
# Use wmake -all instead of Allwmake to allow for overrides
( cd "$moduleName" && wmake -all $targetType )
fi
done
......
......@@ -6,9 +6,10 @@
# \\ / A nd | www.openfoam.com
# \\/ M anipulation |
#------------------------------------------------------------------------------
# SPDX-License-Identifier: (GPL-3.0+)
# Copyright (C) 2020 OpenCFD Ltd.
#------------------------------------------------------------------------------
# SPDX-License-Identifier: (GPL-3.0+)
#
# Script
# list-modules
#
......
......@@ -2,7 +2,7 @@
# AMD compiler - a clang variant
include $(GENERAL_RULES)/Clang/c++
c++ARCH = -m64
c++ARCH = -m64 -pthread
include $(DEFAULT_RULES)/c++$(WM_COMPILE_OPTION)
......
......@@ -59,8 +59,8 @@ Usage: $Script [OPTION] [dir]
options:
-s | -silent Silent mode (do not echo commands)
-a | -all wmake all sub-directories, running Allwmake if present
-q | -queue wmakeCollect sub-directories, running Allwmake if present
-a | -all wmake all sub-directories, runs Allwmake if present
-q | -queue Collect as single Makefile, runs Allwmake if present
-k | -keep-going Keep going even when errors occur (-non-stop)
-j | -jN | -j N Compile using all or specified N cores/hyperthreads
-update Update lnInclude, dep files, remove deprecated files/dirs
......@@ -559,13 +559,31 @@ if [ "$optAll" = queue ]
then
[ "$optUpdate" = true ] || wmakeLnIncludeAll $parOpt
if [ -n "$FOAM_BUILDROOT" ] && [ -w "$FOAM_BUILDROOT" ]
then
buildRoot="${FOAM_BUILDROOT}/build/${WM_OPTIONS}"
else
# Assumed to be writable
buildRoot="${WM_PROJECT_DIR}/build/${WM_OPTIONS}"
fi
# Use relative dirname if possible (reproducible names)
if [ "${PWD}" = "${WM_PROJECT_DIR}" ]
then
collectName="_project_"
else
collectName="_${PWD#${WM_PROJECT_DIR}/}"
collectName="${collectName////_}" # Path as unique name
fi
## echo "collect: $buildRoot/$collectName" 1>&2
(
export WM_COLLECT_DIR="$WM_PROJECT_DIR/build/${WM_OPTIONS}/${PWD////_}"
export WM_COLLECT_DIR="$buildRoot/$collectName"
export WM_SCHEDULER="$WM_DIR/wmakeCollect"
trap '$WM_SCHEDULER -kill' TERM INT
"$WM_SCHEDULER" -clean \
&& wmake -all objects \
&& "$WM_SCHEDULER"
&& wmake -all objects \
&& "$WM_SCHEDULER" # Make with assembled makefile
) && wmake -all
exit $?
fi
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment