mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: additional handling of questionable bad FOAM_EXT_LIBBIN values
- if FOAM_EXT_LIBBIN is unset and some scripts set this to /usr/lib* as a fallback (eg, to avoid an undefined value) this will cause a system library to be found before appropriate *_ARCH_PATH entry. This was noticed during a scotch compilation without third-party: resulting in the system library (/usr/lib64/libscotch.so) to be found instead of the SCOTCH_ARCH_PATH location (/usr/lib64/mpi/gcc/openmpi/lib64/). Simply changing the search order doesn't work for use, since we wish to retain a preference for any dynamic libraries discovered in a real FOAM_EXT_LIBBIN. Circumvent these issues by only taking libraries from FOAM_EXT_LIBBIN if it also points to a location within ThirdParty.
This commit is contained in:
@ -79,9 +79,8 @@ have_adios2()
|
||||
then
|
||||
header=$(findFirstFile $ADIOS2_ARCH_PATH/include/$header)
|
||||
|
||||
# FOAM_EXT_LIBBIN is allowed to be unset
|
||||
library=$(findFirstFile \
|
||||
$FOAM_EXT_LIBBIN/$library \
|
||||
"$(thirdExtLib $library)" \
|
||||
$ADIOS2_ARCH_PATH/lib/$library \
|
||||
$ADIOS2_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH/$library \
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user