Files
openfoam/etc/config.csh/functions
Mark Olesen 110b00f048 ENH: improved handling of gmp/mpfr library settings (issue #674)
- export library path for gmp/mpfr from CGAL config files.
  This is required when non-system gmp/mpfr libraries are being
  used, but not using a ThirdParty compiler installation.

- automatically handle lib/ vs lib64/ (eg, for central installations)
  for packages such as boost, CGAL, etc. While the ThirdParty
  compilation of these will normally land in lib64/, this may not be
  the case when they are supplied by another means.

- reworked the handling of foamEtcFile and foamCleanPath for less
  clutter in the configuration files.
  Added the bin/tools/lib-dir script to handle logic that is
  too complex to easily manage in csh.
2018-01-11 01:30:23 +01:00

63 lines
2.1 KiB
Bash

#----------------------------------*-sh-*--------------------------------------
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2018 OpenCFD Ltd.
# \\/ M anipulation |
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM, licensed under GNU General Public License
# <http://www.gnu.org/licenses/>.
#
# File
# etc/config.csh/functions
# - sourced by OpenFOAM-*/etc/cshrc
#
# Description
# C-shell aliases and variables used when sourcing the OpenFOAM environment
#
# Some functionality implemented via bin/tools/lib-dir
#
#------------------------------------------------------------------------------
# Cleaning environment variables
alias _foamClean 'eval `$WM_PROJECT_DIR/bin/foamCleanPath -csh-env=\!*`'
# Prepend PATH, MANPATH, LD_LIBRARY_PATH
alias _foamAddPath 'setenv PATH \!*\:${PATH}'
alias _foamAddMan 'setenv MANPATH \!*\:${MANPATH}'
alias _foamAddLib 'setenv LD_LIBRARY_PATH \!*\:${LD_LIBRARY_PATH}'
# Prefix to LD_LIBRARY_PATH with additional checking
# $1 = base directory for 'lib' or 'lib64'
# $2 = fallback libname ('lib' or 'lib64')
alias _foamAddLibAuto 'eval `$WM_PROJECT_DIR/bin/tools/lib-dir -csh \!*`'
# Source an etc file, possibly with some verbosity
if ($?FOAM_VERBOSE && $?prompt) then
alias _foamEtc 'eval `$WM_PROJECT_DIR/bin/foamEtcFile -csh-verbose \!*`'
else
alias _foamEtc 'eval `$WM_PROJECT_DIR/bin/foamEtcFile -csh \!*`'
endif
#------------------------------------------------------------------------------
# Avoid any ThirdParty settings that may have 'leaked' into the environment
unsetenv MPI_ARCH_PATH
unsetenv ADIOS_ARCH_PATH
unsetenv ADIOS1_ARCH_PATH
unsetenv ADIOS2_ARCH_PATH
unsetenv BOOST_ARCH_PATH
unsetenv CCMIO_ARCH_PATH
unsetenv CGAL_ARCH_PATH
unsetenv FFTW_ARCH_PATH
unsetenv GPERFTOOLS_ARCH_PATH
unsetenv GMP_ARCH_PATH
unsetenv MPFR_ARCH_PATH
unsetenv MESA_ARCH_PATH
unsetenv METIS_ARCH_PATH
unsetenv SCOTCH_ARCH_PATH
#------------------------------------------------------------------------------