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:
Mark Olesen
2018-11-27 12:23:11 +01:00
parent 38d3a36c2d
commit 9065346a05
13 changed files with 33 additions and 24 deletions

View File

@ -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 \
)