CONFIG: rationalize compiler tuning

- support prefs.compiler with better possibilities to provide
  overload values

STYLE: reduce code for WM_ARCH_OPTION (seldom-used)
This commit is contained in:
Mark Olesen 2020-11-07 18:11:27 +01:00
parent 67b3c01e13
commit 26ec9b5a17
13 changed files with 191 additions and 186 deletions

29
.gitignore vendored
View File

@ -12,7 +12,7 @@
# File-browser settings - anywhere
.directory
# CVS recovered versions - anywhere
# Backup/recovery versions - anywhere
.#*
# Objects and archives - anywhere
@ -23,7 +23,7 @@
# Derived files
lex.yy.c
# Corefiles
# Core dumps
core
# Dependency files - anywhere
@ -47,22 +47,21 @@ platforms/
# Reinstate wmake rules that might look like build directories
!/wmake/rules/*/
# doxygen generated documentation
# Doxygen generated
doc/Doxygen/html
doc/Doxygen/latex
doc/Doxygen/man
doc/Doxygen/DTAGS
# Generated files in the main directory (e.g. ReleaseNotes-?.?.html)
# and in the doc directory
# Generated files in the main and doc directories
/*.html
/doc/*.html
# Untracked configuration files
# Untracked configuration/preferences files
/etc/prefs.csh
/etc/prefs.sh
/etc/config.csh/prefs.csh
/etc/config.sh/prefs.sh
/etc/config.csh/prefs.*
/etc/config.sh/prefs.*
/wmake/rules/General/mplibUSER*
# Source packages - anywhere
@ -73,19 +72,11 @@ doc/Doxygen/DTAGS
*.tgz
*.gtgz
# Ignore the persistent .build tag in the main directory
/.build
# Ignore .timeStamp in the main directory
/.timeStamp
# Ignore .tags in the main directory
/.tags
# Ignore project files in the main directory
# Ignore tags or project files in the main directory
/.cproject
/.project
/.dir-locals.el
/.project
/.tags
# Ignore the test directory
/tutorialsTest

View File

@ -36,10 +36,17 @@ case ThirdParty:
set default_mpfr_version=mpfr-system
set default_mpc_version=mpc-system
# Clear any old values
set gcc_version=''
set clang_version=''
switch ("$WM_COMPILER")
case Gcc:
set gcc_version="$default_gcc_version"
breaksw
case Gcc102*:
set gcc_version=gcc-10.2.0
breaksw
case Gcc101*:
set gcc_version=gcc-10.1.0
breaksw
@ -121,8 +128,11 @@ case ThirdParty:
case Clang:
set clang_version="$default_clang_version"
breaksw
case Clang110*:
set clang_version=llvm-11.0.0
breaksw
case Clang100*:
set clang_version=llvm-10.0.0
set clang_version=llvm-10.0.1
breaksw
case Clang90*:
set clang_version=llvm-9.0.1
@ -155,7 +165,13 @@ case ThirdParty:
set clang_version=llvm-3.7.1
breaksw
default:
endsw
_foamEtc -config prefs.compiler ## Optional adjustments
_foamEtc -config "compiler-$WM_COMPILER" ## Per-compiler override
# Trap errors
if ( "${gcc_version}${clang_version}" == "" ) then
/bin/cat << UNKNOWN_COMPILER
===============================================================================
Warning in $WM_PROJECT_DIR/etc/config.csh/compiler:
@ -164,14 +180,11 @@ Unknown ThirdParty compiler type/version - '$WM_COMPILER'
Please check your settings
===============================================================================
UNKNOWN_COMPILER
breaksw
endsw
# Per-compiler overrides in "compiler-$WM_COMPILER" files
_foamEtc -config "compiler-$WM_COMPILER"
endif
breaksw
endsw
unset default_gcc_version default_clang_version
unset default_gmp_version default_mpfr_version default_mpc_version

View File

@ -12,10 +12,12 @@
#
# File
# config.csh/example/compiler-Gcc92
# - sourced by OpenFOAM-*/etc/config.csh/compiler
#
# Description
# Example of fine tuning compiler settings with a hook
# Example of tuning compiler settings with a hook (C-shell).
#
# Copy to etc/config.csh (or ~/.OpenFOAM/config.csh) and it will be
# sourced by OpenFOAM-*/etc/config.csh/compiler
#
#------------------------------------------------------------------------------

View File

@ -5,11 +5,10 @@
# \\ / A nd | www.openfoam.com
# \\/ M anipulation |
#------------------------------------------------------------------------------
# Copyright (C) 2018 OpenCFD Ltd.
# Copyright (C) 2018-2020 OpenCFD Ltd.
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM, licensed under GNU General Public License
# <http://www.gnu.org/licenses/>.
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
#
# File
# config.csh/example/paraview

View File

@ -6,26 +6,26 @@
# \\/ M anipulation |
#------------------------------------------------------------------------------
# Copyright (C) 2011-2016 OpenFOAM Foundation
# Copyright (C) 2017 OpenCFD Ltd.
# Copyright (C) 2017-2020 OpenCFD Ltd.
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
#
# File
# config.csh/example/compiler
# - sourced by OpenFOAM-*/etc/config.csh/settings
# config.csh/example/prefs.compiler
#
# Description
# Older example of fine tuning compiler settings for OpenFOAM
# Example of tuning compiler settings with a hook (POSIX shell).
#
# The preferred mechanism is now with a "compiler-$WM_COMPILER" file
# Copy to etc/config.sh (or ~/.OpenFOAM/config.sh) and it will be
# sourced by OpenFOAM-*/etc/config.sh/compiler
#
# Note
# The preferred mechanism is often a "compiler-$WM_COMPILER" file
# in one of the etc/ directories.
#
#------------------------------------------------------------------------------
# Load the standard versions
eval `$WM_PROJECT_DIR/bin/foamEtcFile -csh -config -mode=o compiler`
# Modify/override compiler settings
switch ("$WM_COMPILER")
case Gcc70*:

View File

@ -13,14 +13,15 @@
#
# File
# config.csh/example/prefs.csh
# - sourced by OpenFOAM-*/etc/cshrc
#
# Description
# Example of preset variables for the OpenFOAM configuration (C-Shell shell)
# Example of preset variables for configuring OpenFOAM (C-shell)
#
# Copy to OpenFOAM-*/etc (or ~/.OpenFOAM) and it will be sourced by
# OpenFOAM-*/etc/cshrc
#
# See also
# 'foamEtcFile -help' or 'foamEtcFile -list' for information about the
# paths searched
# 'foamEtcFile -help' or 'foamEtcFile -list' for the paths searched
#
#------------------------------------------------------------------------------

View File

@ -19,7 +19,7 @@
# Settings for OpenFOAM
#
#------------------------------------------------------------------------------
setenv WM_ARCH `uname -s` # System name
setenv WM_ARCH `uname -s` # System name
set archOption=64
if ($?WM_ARCH_OPTION) then
@ -28,7 +28,7 @@ endif
unsetenv WM_ARCH_OPTION # Compiling 32-bit on 64-bit system
setenv WM_COMPILER_ARCH # Host compiler type (when different than target)
setenv WM_COMPILER_LIB_ARCH # Additional ending for lib directories
setenv WM_COMPILER_LIB_ARCH # Ending for lib directories
if (! $?WM_COMPILE_OPTION ) setenv WM_COMPILE_OPTION
# Adjust according to system and architecture
@ -37,54 +37,46 @@ case Linux:
setenv WM_ARCH linux
switch (`uname -m`)
case i686:
case x86_64:
if ( "$archOption" == "32" ) then
setenv WM_ARCH_OPTION 32 # Propagate?
setenv WM_COMPILER_ARCH 64 # 64-bit compiler, 32-bit target
else
setenv WM_ARCH linux64 # 64-bit compiler/target
setenv WM_COMPILER_LIB_ARCH 64 # Use lib64
endif
breaksw
case x86_64:
switch ("$archOption")
case 32:
setenv WM_ARCH_OPTION 32 # Need to propagate the value
setenv WM_COMPILER_ARCH 64 # 64-bit compiler, 32-bit target
breaksw
case aarch64:
setenv WM_ARCH linuxARM64
setenv WM_COMPILER_LIB_ARCH 64 # Use lib64
breaksw
case 64:
setenv WM_ARCH linux64
setenv WM_COMPILER_LIB_ARCH 64 # Target with lib64
breaksw
case armv7l:
setenv WM_ARCH linuxARM7
setenv WM_COMPILER_LIB_ARCH 32 # Use lib32
breaksw
default:
echo "Unknown WM_ARCH_OPTION '$archOption', should be 32|64"
breaksw
case ppc64:
setenv WM_ARCH linuxPPC64
setenv WM_COMPILER_LIB_ARCH 64 # Use lib64
breaksw
endsw
case ppc64le:
setenv WM_ARCH linuxPPC64le
setenv WM_COMPILER_LIB_ARCH 64 # Use lib64
breaksw
case i686:
setenv WM_ARCH linux
breaksw
case ia64:
setenv WM_ARCH linuxIA64
breaksw
case armv7l:
setenv WM_ARCH linuxARM7
setenv WM_COMPILER_LIB_ARCH 32
breaksw
case aarch64:
setenv WM_ARCH linuxARM64
setenv WM_COMPILER_LIB_ARCH 64
breaksw
case ppc64:
setenv WM_ARCH linuxPPC64
setenv WM_COMPILER_LIB_ARCH 64
breaksw
case ppc64le:
setenv WM_ARCH linuxPPC64le
setenv WM_COMPILER_LIB_ARCH 64
breaksw
default:
echo Unknown processor type `uname -m` for Linux
echo "openfoam: (`uname -m`) - unknown Linux processor type"
breaksw
endsw
@ -93,17 +85,17 @@ case Linux:
# Presume x86_64, with clang (not gcc) as system compiler
case Darwin:
setenv WM_ARCH darwin64
if ("$WM_COMPILER" == Gcc) setenv WM_COMPILER Clang
echo "Darwin support is clang/llvm only"
if ( "$WM_COMPILER" == Gcc ) setenv WM_COMPILER Clang
echo "openfoam: darwin support is clang/llvm only"
breaksw
# Presume x86_64, with mingw cross-compiled
case MINGW*:
case MSYS*:
WM_ARCH=win64
if ("$WM_COMPILER" == Gcc) setenv WM_COMPILER Mingw
if ( "$WM_COMPILER" == Gcc ) setenv WM_COMPILER Mingw
setenv WM_COMPILER_LIB_ARCH 64 # Consistent with linux64Mingw
echo "Windows support (mingw64) is runtime only"
echo "openfoam: windows support (mingw64) is runtime only"
;;
case SunOS*:
@ -115,7 +107,7 @@ default:
/bin/cat << UNSUPPORTED
===============================================================================
Operating system '$WM_ARCH' is unsupported by this OpenFOAM release.
For further assistance, please contact www.OpenFOAM.com
For further assistance, please contact www.openfoam.com
===============================================================================
UNSUPPORTED
breaksw
@ -238,10 +230,10 @@ case ThirdParty-Gcc*:
if (! $?gmp_version ) set gmp_version=gmp-system
if (! $?mpfr_version ) set mpfr_version=mpfr-system
if (! $?mpc_version ) set mpc_version=mpc-system
set gccDir=$archDir/$gcc_version
set gmpDir=$archDir/$gmp_version
set mpfrDir=$archDir/$mpfr_version
set mpcDir=$archDir/$mpc_version
set gccDir="$archDir/$gcc_version"
set gmpDir="$archDir/$gmp_version"
set mpfrDir="$archDir/$mpfr_version"
set mpcDir="$archDir/$mpc_version"
# Check that the compiler directory can be found
if ( ! -d "$gccDir" ) then
@ -257,24 +249,24 @@ Cannot find '$WM_COMPILER' compiler installation
GCC_NOT_FOUND
endif
_foamAddMan $gccDir/man
_foamAddPath $gccDir/bin
_foamAddMan "$gccDir"/man
_foamAddPath "$gccDir"/bin
# Add ThirdParty compiler libraries to run-time environment
_foamAddLib $gccDir/lib$WM_COMPILER_LIB_ARCH
_foamAddLib "$gccDir/lib$WM_COMPILER_LIB_ARCH"
# Add gmp/mpfr/mpc libraries to run-time environment.
# Require that they exist, automatically find lib64/ or lib/.
if ( "${gmpDir:t}" != "gmp-system" ) then
_foamAddLibAuto $gmpDir
setenv GMP_ARCH_PATH $gmpDir # For non-system CGAL
_foamAddLibAuto "$gmpDir"
setenv GMP_ARCH_PATH "$gmpDir" # For non-system CGAL
endif
if ( "${mpfrDir:t}" != "mpfr-system" ) then
_foamAddLibAuto $mpfrDir
setenv MPFR_ARCH_PATH $mpfrDir # For non-system CGAL
_foamAddLibAuto "$mpfrDir"
setenv MPFR_ARCH_PATH "$mpfrDir" # For non-system CGAL
endif
_foamAddLibAuto $mpcDir
_foamAddLibAuto "$mpcDir"
if ($?FOAM_VERBOSE && $?prompt) then
echo "Using ThirdParty compiler"
@ -283,7 +275,7 @@ GCC_NOT_FOUND
breaksw
case ThirdParty-Clang*:
set clangDir=$archDir/$clang_version
set clangDir="$archDir/$clang_version"
# Check that the compiler directory can be found
if ( ! -d "$clangDir" ) then
@ -299,9 +291,9 @@ Cannot find '$WM_COMPILER' compiler installation
CLANG_NOT_FOUND
endif
_foamAddMan $clangDir/man
_foamAddPath $clangDir/bin
_foamAddLib $clangDir/lib # For things like libomp (openmp) etc
_foamAddMan "$clangDir"/share/man
_foamAddPath "$clangDir"/bin
_foamAddLib "$clangDir"/lib # For things like libomp (openmp) etc
if ($?FOAM_VERBOSE && $?prompt) then
echo "Using ThirdParty compiler"

View File

@ -40,8 +40,12 @@ ThirdParty)
mpfr_version="$default_mpfr_version"
mpc_version="$default_mpc_version"
# Clear any old values
unset gcc_version clang_version
case "$WM_COMPILER" in
Gcc) gcc_version="$default_gcc_version" ;;
Gcc102*) gcc_version=gcc-10.2.0 ;;
Gcc101*) gcc_version=gcc-10.1.0 ;;
Gcc93*) gcc_version=gcc-9.3.0 ;;
Gcc92*) gcc_version=gcc-9.2.0 ;;
@ -70,7 +74,8 @@ ThirdParty)
Gcc48*) gcc_version=gcc-4.8.5 ;;
Clang) clang_version="$default_clang_version" ;;
Clang100*) clang_version=llvm-10.0.0 ;;
Clang110*) clang_version=llvm-11.0.0 ;;
Clang100*) clang_version=llvm-10.0.1 ;;
Clang90*) clang_version=llvm-9.0.1 ;;
Clang80*) clang_version=llvm-8.0.1 ;;
Clang71*) clang_version=llvm-7.1.0 ;;
@ -82,7 +87,14 @@ ThirdParty)
Clang38*) clang_version=llvm-3.8.1 ;;
Clang37*) clang_version=llvm-3.7.1 ;;
*)
esac
_foamEtc -config prefs.compiler ## Optional adjustments
_foamEtc -config "compiler-$WM_COMPILER" ## Per-compiler override
# Trap errors
if [ -z "$gcc_version$clang_version" ]
then
/bin/cat << UNKNOWN_COMPILER 1>&2
===============================================================================
Warning in $WM_PROJECT_DIR/etc/config.sh/compiler:
@ -91,14 +103,11 @@ Unknown ThirdParty compiler type/version - '$WM_COMPILER'
Please check your settings
===============================================================================
UNKNOWN_COMPILER
;;
esac
# Per-compiler overrides in "compiler-$WM_COMPILER" files
_foamEtc -config "compiler-$WM_COMPILER"
fi
;;
esac
unset default_gcc_version default_clang_version
unset default_gmp_version default_mpfr_version default_mpc_version

View File

@ -12,10 +12,12 @@
#
# File
# config.sh/example/compiler-Gcc92
# - sourced by OpenFOAM-*/etc/config.sh/compiler
#
# Description
# Example of fine tuning compiler settings with a hook
# Example of tuning compiler settings with a hook (POSIX shell).
#
# Copy to etc/config.sh (or ~/.OpenFOAM/config.sh) and it will be
# sourced by OpenFOAM-*/etc/config.sh/compiler
#
#------------------------------------------------------------------------------

View File

@ -5,11 +5,10 @@
# \\ / A nd | www.openfoam.com
# \\/ M anipulation |
#------------------------------------------------------------------------------
# Copyright (C) 2018 OpenCFD Ltd.
# Copyright (C) 2018-2020 OpenCFD Ltd.
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM, licensed under GNU General Public License
# <http://www.gnu.org/licenses/>.
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
#
# File
# config.sh/example/paraview

View File

@ -6,26 +6,26 @@
# \\/ M anipulation |
#------------------------------------------------------------------------------
# Copyright (C) 2011-2016 OpenFOAM Foundation
# Copyright (C) 2017 OpenCFD Ltd.
# Copyright (C) 2017-2020 OpenCFD Ltd.
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
#
# File
# config.sh/example/compiler
# - sourced by OpenFOAM-*/etc/config.sh/settings
# config.sh/example/prefs.compiler
#
# Description
# Older example of fine tuning compiler settings for OpenFOAM.
# Example of tuning compiler settings with a hook (C-shell).
#
# The preferred mechanism is now with a "compiler-$WM_COMPILER" file
# Copy to etc/config.csh (or ~/.OpenFOAM/config.csh) and it will be
# sourced by OpenFOAM-*/etc/config.csh/compiler
#
# Note
# The preferred mechanism is often a "compiler-$WM_COMPILER" file
# in one of the etc/ directories.
#
#------------------------------------------------------------------------------
# Load the standard versions
eval $($WM_PROJECT_DIR/bin/foamEtcFile -sh -config -mode=o compiler)
# Modify/override compiler settings
case "$WM_COMPILER" in
Gcc70*)

View File

@ -6,21 +6,22 @@
# \\/ M anipulation |
#------------------------------------------------------------------------------
# Copyright (C) 2011-2016 OpenFOAM Foundation
# Copyright (C) 2020 OpenCFD Ltd.
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM, licensed under GNU General Public License
# <http://www.gnu.org/licenses/>.
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
#
# File
# config.sh/example/prefs.sh
# - sourced by OpenFOAM-*/etc/bashrc
#
# Description
# Example of preset variables for the OpenFOAM configuration (POSIX shell)
# Example of preset variables for configuring OpenFOAM (POSIX shell)
#
# Copy to OpenFOAM-*/etc (or ~/.OpenFOAM) and it will be sourced by
# OpenFOAM-*/etc/bashrc
#
# See also
# 'foamEtcFile -help' or 'foamEtcFile -list' for information about the
# paths searched
# 'foamEtcFile -help' or 'foamEtcFile -list' for the paths searched
#
#------------------------------------------------------------------------------

View File

@ -19,12 +19,12 @@
# Settings for OpenFOAM.
#
#------------------------------------------------------------------------------
export WM_ARCH="$(uname -s)" # System name
export WM_ARCH="$(uname -s)" # System name
archOption="${WM_ARCH_OPTION:-64}"
unset WM_ARCH_OPTION # Compiling 32-bit on 64-bit system
unset WM_COMPILER_ARCH # Host compiler type (when different than target)
unset WM_COMPILER_LIB_ARCH # Additional ending for lib directories
unset WM_COMPILER_LIB_ARCH # Ending for lib directories
# Adjust according to system and architecture
@ -33,51 +33,47 @@ Linux)
WM_ARCH=linux
case "$(uname -m)" in
i686)
x86_64)
if [ "$archOption" = 32 ]
then
export WM_ARCH_OPTION=32 # Propagate?
export WM_COMPILER_ARCH=64 # 64-bit compiler, 32-bit target
else
WM_ARCH=linux64 # 64-bit compiler/target
export WM_COMPILER_LIB_ARCH=64 # Use lib64
fi
;;
x86_64)
case "$archOption" in
32)
export WM_ARCH_OPTION=32 # Need to propagate the value
export WM_COMPILER_ARCH=64 # 64-bit compiler, 32-bit target
;;
64)
WM_ARCH=linux64
export WM_COMPILER_LIB_ARCH=64 # Target with lib64
;;
*)
echo "Unknown WM_ARCH_OPTION '$archOption', should be 32|64" 1>&2
;;
esac
aarch64)
WM_ARCH=linuxARM64
export WM_COMPILER_LIB_ARCH=64 # Use lib64
;;
armv7l)
WM_ARCH=linuxARM7
export WM_COMPILER_LIB_ARCH=32 # Use lib32
;;
ppc64)
WM_ARCH=linuxPPC64
export WM_COMPILER_LIB_ARCH=64 # Use lib64
;;
ppc64le)
WM_ARCH=linuxPPC64le
export WM_COMPILER_LIB_ARCH=64 # Use lib64
;;
i686)
WM_ARCH=linux
;;
ia64)
WM_ARCH=linuxIA64
;;
armv7l)
WM_ARCH=linuxARM7
export WM_COMPILER_LIB_ARCH=32
;;
aarch64)
WM_ARCH=linuxARM64
export WM_COMPILER_LIB_ARCH=64
;;
ppc64)
WM_ARCH=linuxPPC64
export WM_COMPILER_LIB_ARCH=64
;;
ppc64le)
WM_ARCH=linuxPPC64le
export WM_COMPILER_LIB_ARCH=64
;;
*)
echo Unknown processor type "$(uname -m)" for Linux 1>&2
echo "openfoam: ($(uname -m)) - unknown Linux processor type" 1>&2
;;
esac
;;
@ -86,7 +82,7 @@ Linux)
Darwin)
WM_ARCH=darwin64
[ "$WM_COMPILER" = Gcc ] && WM_COMPILER=Clang
echo "Darwin support is clang/llvm only" 1>&2
echo "openfoam: darwin support is clang/llvm only" 1>&2
;;
# Presume x86_64, with mingw cross-compiled
@ -94,7 +90,7 @@ MINGW* | MSYS*)
WM_ARCH=win64
[ "$WM_COMPILER" = Gcc ] && WM_COMPILER=Mingw
export WM_COMPILER_LIB_ARCH=64 # Consistent with linux64Mingw
echo "Windows support (mingw64) is runtime only" 1>&2
echo "openfoam: windows support (mingw64) is runtime only" 1>&2
;;
SunOS*)
@ -106,7 +102,7 @@ SunOS*)
/bin/cat << UNSUPPORTED 1>&2
===============================================================================
Operating system '$WM_ARCH' is unsupported by this OpenFOAM release.
For further assistance, please contact www.OpenFOAM.com
For further assistance, please contact www.openfoam.com
===============================================================================
UNSUPPORTED
;;
@ -210,7 +206,7 @@ export FOAM_RUN="$WM_PROJECT_USER_DIR/run"
# ~~~~~~~~~~~~~~~~~
# Default to system compiler
: ${WM_COMPILER_TYPE:=system}; export WM_COMPILER_TYPE
: "${WM_COMPILER_TYPE:=system}"; export WM_COMPILER_TYPE
# Non-POSIX systems and cross-compiling
case "$WM_COMPILER" in
@ -232,10 +228,10 @@ archDir="$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH"
case "$WM_COMPILER_TYPE-$WM_COMPILER" in
ThirdParty-Gcc*)
gccDir=$archDir/$gcc_version
gmpDir=$archDir/${gmp_version:-gmp-system}
mpfrDir=$archDir/${mpfr_version:-mpfr-system}
mpcDir=$archDir/${mpc_version:-mpc-system}
gccDir="$archDir/$gcc_version"
gmpDir="$archDir/${gmp_version:-gmp-system}"
mpfrDir="$archDir/${mpfr_version:-mpfr-system}"
mpcDir="$archDir/${mpc_version:-mpc-system}"
# Check that the compiler directory can be found
[ -d "$gccDir" ] || /bin/cat << GCC_NOT_FOUND 1>&2
@ -249,21 +245,21 @@ Cannot find '$WM_COMPILER' compiler installation
===============================================================================
GCC_NOT_FOUND
_foamAddMan $gccDir/man
_foamAddPath $gccDir/bin
_foamAddMan "$gccDir"/man
_foamAddPath "$gccDir"/bin
# Add ThirdParty compiler libraries to run-time environment
_foamAddLib $gccDir/lib$WM_COMPILER_LIB_ARCH
_foamAddLib "$gccDir/lib$WM_COMPILER_LIB_ARCH"
# Add gmp/mpfr/mpc libraries to run-time environment.
# Require that they exist, automatically find lib64/ or lib/.
_foamAddLibAuto $gmpDir && \
export GMP_ARCH_PATH=$gmpDir # For non-system CGAL
_foamAddLibAuto "$gmpDir" && \
export GMP_ARCH_PATH="$gmpDir" # For non-system CGAL
_foamAddLibAuto $mpfrDir && \
export MPFR_ARCH_PATH=$mpfrDir # For non-system CGAL
_foamAddLibAuto "$mpfrDir" && \
export MPFR_ARCH_PATH="$mpfrDir" # For non-system CGAL
_foamAddLibAuto $mpcDir
_foamAddLibAuto "$mpcDir"
if [ -n "$FOAM_VERBOSE" ] && [ -n "$PS1" ]
then
@ -273,7 +269,7 @@ GCC_NOT_FOUND
;;
ThirdParty-Clang*)
clangDir=$archDir/$clang_version
clangDir="$archDir/$clang_version"
# Check that the compiler directory can be found
[ -d "$clangDir" ] || /bin/cat << CLANG_NOT_FOUND 1>&2
@ -287,9 +283,9 @@ Cannot find '$WM_COMPILER' compiler installation
===============================================================================
CLANG_NOT_FOUND
_foamAddMan $clangDir/share/man
_foamAddPath $clangDir/bin
_foamAddLib $clangDir/lib # For things like libomp (openmp) etc
_foamAddMan "$clangDir"/share/man
_foamAddPath "$clangDir"/bin
_foamAddLib "$clangDir"/lib # For things like libomp (openmp) etc
if [ -n "$FOAM_VERBOSE" ] && [ -n "$PS1" ]
then