mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
CONFIG: adjustments to environment
- provide default WM_DIR if not already set, to improve robustness if a
reduced environment is used
- add etc/ to WM_PROJECT_SITE search. This makes the site directory
structure consistent with the OpenFOAM structure.
Eg,
WM_PROJECT_SITE/etc/..
WM_PROJECT_SITE/bin/..
WM_PROJECT_SITE/platforms/..
- Don't set/export WM_OSTYPE. The default is POSIX and is properly
defaulted throughout, including in CMakeLists-OpenFOAM.txt (also for
Catalyst)
This commit is contained in:
@ -18,7 +18,7 @@
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
export WM_ARCH=$(uname -s) # System name
|
||||
: ${WM_OSTYPE:=POSIX}; export WM_OSTYPE # System type (POSIX is default)
|
||||
## : ${WM_OSTYPE:=POSIX}; export WM_OSTYPE # System type (POSIX is default)
|
||||
|
||||
# Default compiler = gcc/g++ and C++11
|
||||
export WM_CC="gcc"
|
||||
@ -167,7 +167,17 @@ export FOAM_USER_LIBBIN="$WM_PROJECT_USER_DIR/platforms/$WM_OPTIONS/lib"
|
||||
|
||||
|
||||
# Prepend wmake to the path - not required for runtime-only environment
|
||||
[ -d "$WM_DIR" ] && PATH="$WM_DIR:$PATH"
|
||||
foundDir="$WM_PROJECT_DIR/wmake"
|
||||
if [ -d "$WM_DIR" ]
|
||||
then
|
||||
foundDir="${WM_DIR}"
|
||||
fi
|
||||
if [ -d "$foundDir" ]
|
||||
then
|
||||
PATH="$foundDir:$PATH"
|
||||
else
|
||||
unset WM_DIR
|
||||
fi
|
||||
|
||||
# Prepend OpenFOAM scripts to the path
|
||||
export PATH="$WM_PROJECT_DIR/bin:$PATH"
|
||||
@ -336,7 +346,7 @@ esac
|
||||
|
||||
# Cleanup
|
||||
# ~~~~~~~
|
||||
unset archDir siteDir
|
||||
unset archDir siteDir foundDir
|
||||
unset gcc_version gccDir
|
||||
unset gmp_version gmpDir mpfr_version mpfrDir mpc_version mpcDir
|
||||
unset clang_version clangDir
|
||||
|
||||
Reference in New Issue
Block a user