CONFIG: improve config files for Darwin (#1667), BSD-csh syntax (#1668)

- use Clang instead of Gcc for Darwin since this is its system
  compiler. The user can force use of Gcc by using Gcc92 etc.

- make etc/cshrc sed check more robust.

- replace tcsh (${%var}) syntax with ("${var}" != "")

[Fixes and ideas from Alexey Matveichev]

CONFIG: do not source the gperftools environment by default

- this is now an used feature, but can be re-enabled by advanced users
  if required.
This commit is contained in:
Mark Olesen
2020-04-08 10:37:21 +02:00
parent 3fd91c9084
commit f01ad2f187
13 changed files with 50 additions and 34 deletions

View File

@ -27,7 +27,14 @@ 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}'
# Special treatment for Darwin
# - DYLD_LIBRARY_PATH instead of LD_LIBRARY_PATH
if (`uname -s` == "Darwin") then
alias _foamAddLib 'setenv DYLD_LIBRARY_PATH \!*\:${DYLD_LIBRARY_PATH}'
else
alias _foamAddLib 'setenv LD_LIBRARY_PATH \!*\:${LD_LIBRARY_PATH}'
endif
# Prefix to LD_LIBRARY_PATH with additional checking
# $1 = base directory for 'lib' or 'lib64'
@ -59,6 +66,7 @@ unsetenv FFTW_ARCH_PATH
unsetenv GPERFTOOLS_ARCH_PATH
unsetenv GMP_ARCH_PATH
unsetenv MPFR_ARCH_PATH
unsetenv LLVM_ARCH_PATH
unsetenv MESA_ARCH_PATH
unsetenv METIS_ARCH_PATH
unsetenv SCOTCH_ARCH_PATH