CONFIG: fixes for MacOS (#2555)

- introduce a FOAM_LD_LIBRARY_PATH variable to shadow
  DYLD_LIBRARY_PATH on MacOS.

  The DYLD_LIBRARY_PATH and LD_LIBRARY_PATH cannot be modified via sub
  shells etc when SIP is active. This helps circumvent these
  restrictions, which is obviously a hack, but seems to be required.

COMP: disable -ftrapping-math in geompack for MacOS
This commit is contained in:
Alexey Matveichev
2022-08-16 15:50:12 +02:00
committed by Mark Olesen
parent 5218bfd721
commit e827c117e3
14 changed files with 161 additions and 87 deletions

View File

@ -6,7 +6,7 @@
# \\/ M anipulation |
#------------------------------------------------------------------------------
# Copyright (C) 2011-2016 OpenFOAM Foundation
# Copyright (C) 2016-2021 OpenCFD Ltd.
# Copyright (C) 2016-2022 OpenCFD Ltd.
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
@ -164,7 +164,9 @@ then
eval "$($foamClean -sh-env=PATH $foamOldDirs)"
eval "$($foamClean -sh-env=MANPATH $foamOldDirs)"
eval "$($foamClean -sh-env=LD_LIBRARY_PATH $foamOldDirs)"
eval "$($foamClean -sh-env=DYLD_LIBRARY_PATH $foamOldDirs)"
# Darwin
eval "$($foamClean -sh-env=FOAM_LD_LIBRARY_PATH $foamOldDirs)"
export DYLD_LIBRARY_PATH="$FOAM_LD_LIBRARY_PATH"
fi
[ -n "$MANPATH" ] || unset MANPATH
@ -172,7 +174,7 @@ fi
[ -n "$DYLD_LIBRARY_PATH" ] || unset DYLD_LIBRARY_PATH
# Remove any shadow env variables
unset FOAM_DYLD_LIBRARY_PATH
unset FOAM_DYLD_LIBRARY_PATH FOAM_LD_LIBRARY_PATH
#------------------------------------------------------------------------------
# Cleanup aliases and functions