Errors in include paths for system Third Party libraries

This commit is contained in:
Hrvoje Jasak 2022-03-04 10:18:26 +00:00
parent b42fb8a346
commit fdbbd6536a
2 changed files with 45 additions and 93 deletions

View file

@ -502,21 +502,6 @@ if ( $?CGAL_LIB_DIR ) then
_foamAddLib $CGAL_LIB_DIR _foamAddLib $CGAL_LIB_DIR
endif endif
# Third party packages
#
# In order to use a pre-installed version of the ThirdParty packages, just set the
# appropriate XXX_SYSTEM environment variable for a given package in your prefs.sh
# file in order to disable the activation of the ThirdParty version of the same package.
# Default locations for pre-installed version of the ThirdParty packages
# Use prefs.sh to pre-initialize to different default values, accordingly to
# your Linux/Unix flavour
if ( ! $?WM_SYSTEM_DIR ) setenv WM_SYSTEM_DIR /usr
if ( ! $?WM_SYSTEM_BIN_DIR ) setenv WM_SYSTEM_BIN_DIR $WM_SYSTEM_DIR/bin
if ( ! $?WM_SYSTEM_LIB_DIR ) setenv WM_SYSTEM_LIB_DIR $WM_SYSTEM_DIR/lib
if ( ! $?WM_SYSTEM_INCLUDE_DIR ) setenv WM_SYSTEM_INCLUDE_DIR $WM_SYSTEM_DIR/include
# Mesquite library if available # Mesquite library if available
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
if ( $?MESQUITE_SYSTEM == 0 && $?WM_THIRD_PARTY_USE_MESQUITE_212 != 0 && -e $WM_THIRD_PARTY_DIR/packages/mesquite-2.1.2/platforms/$WM_OPTIONS ) then if ( $?MESQUITE_SYSTEM == 0 && $?WM_THIRD_PARTY_USE_MESQUITE_212 != 0 && -e $WM_THIRD_PARTY_DIR/packages/mesquite-2.1.2/platforms/$WM_OPTIONS ) then
@ -529,32 +514,24 @@ endif
# Metis library if available # Metis library if available
# ~~~~~~~~~~~~~~~~~~~~~~~~~~ # ~~~~~~~~~~~~~~~~~~~~~~~~~~
if ( $?METIS_SYSTEM) then if ( $?METIS_SYSTEM) then
# Using system libraries. setenv METIS_DIR /usr
# Some values might already be pre-initialized in prefs.sh setenv METIS_BIN_DIR /usr/bin
# If not, use the default WM_SYSTEM_XXX values setenv METIS_LIB_DIR /lib
if ( ! $?METIS_DIR ) setenv METIS_DIR $WM_SYSTEM_DIR setenv METIS_INCLUDE_DIR /usr/include
if ( ! $?METIS_BIN_DIR ) setenv METIS_BIN_DIR $WM_SYSTEM_BIN_DIR
if ( ! $?METIS_LIB_DIR ) setenv METIS_LIB_DIR $WM_SYSTEM_LIB_DIR
if ( ! $?METIS_INCLUDE_DIR ) setenv METIS_INCLUDE_DIR $WM_SYSTEM_INCLUDE_DIR
endif endif
if ( $?METIS_SYSTEM == 0 && $?WM_THIRD_PARTY_USE_METIS_510 != 0 && -e $WM_THIRD_PARTY_DIR/packages/metis-5.1.0/platforms/$WM_OPTIONS ) then if ( $?METIS_SYSTEM == 0 && $?WM_THIRD_PARTY_USE_METIS_510 != 0 && -e $WM_THIRD_PARTY_DIR/packages/metis-5.1.0/platforms/$WM_OPTIONS ) then
# Using ThirdParty package for Metis
_foamSource $WM_THIRD_PARTY_DIR/packages/metis-5.1.0/platforms/$WM_OPTIONS/etc/metis-5.1.0.csh _foamSource $WM_THIRD_PARTY_DIR/packages/metis-5.1.0/platforms/$WM_OPTIONS/etc/metis-5.1.0.csh
endif endif
# ParMetis library if available # ParMetis library if available
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
if ( $?PARMETIS_SYSTEM) then if ( $?PARMETIS_SYSTEM) then
# Using system libraries. setenv PARMETIS_DIR /usr
# Some values might already be pre-initialized in prefs.sh setenv PARMETIS_BIN_DIR /usr/bin
# If not, use the default WM_SYSTEM_XXX values setenv PARMETIS_LIB_DIR /lib
if ( ! $?PARMETIS_DIR ) setenv PARMETIS_DIR $WM_SYSTEM_DIR setenv PARMETIS_INCLUDE_DIR /usr/include
if ( ! $?PARMETIS_BIN_DIR ) setenv PARMETIS_BIN_DIR $WM_SYSTEM_BIN_DIR
if ( ! $?PARMETIS_LIB_DIR ) setenv PARMETIS_LIB_DIR $WM_SYSTEM_LIB_DIR
if ( ! $?PARMETIS_INCLUDE_DIR ) setenv PARMETIS_INCLUDE_DIR $WM_SYSTEM_INCLUDE_DIR
endif endif
if ( $?PARMETIS_SYSTEM == 0 && $?WM_THIRD_PARTY_USE_PARMETIS_403 != 0 && -e $WM_THIRD_PARTY_DIR/packages/parmetis-4.0.3/platforms/$WM_OPTIONS ) then if ( $?PARMETIS_SYSTEM == 0 && $?WM_THIRD_PARTY_USE_PARMETIS_403 != 0 && -e $WM_THIRD_PARTY_DIR/packages/parmetis-4.0.3/platforms/$WM_OPTIONS ) then
# Using ThirdParty package for ParMetis
_foamSource $WM_THIRD_PARTY_DIR/packages/parmetis-4.0.3/platforms/$WM_OPTIONS/etc/parmetis-4.0.3.csh _foamSource $WM_THIRD_PARTY_DIR/packages/parmetis-4.0.3/platforms/$WM_OPTIONS/etc/parmetis-4.0.3.csh
endif endif
@ -574,16 +551,12 @@ endif
# Scotch library if available # Scotch library if available
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~
if ( $?SCOTCH_SYSTEM) then if ( $?SCOTCH_SYSTEM) then
# Using system libraries. setenv SCOTCH_DIR /usr
# Some values might already be pre-initialized in prefs.sh setenv SCOTCH_BIN_DIR /usr/bin
# If not, use the default WM_SYSTEM_XXX values setenv SCOTCH_LIB_DIR /lib
if ( ! $?SCOTCH_DIR ) setenv SCOTCH_DIR $WM_SYSTEM_DIR setenv SCOTCH_INCLUDE_DIR /usr/include/scotch
if ( ! $?SCOTCH_BIN_DIR ) setenv SCOTCH_BIN_DIR $WM_SYSTEM_BIN_DIR
if ( ! $?SCOTCH_LIB_DIR ) setenv SCOTCH_LIB_DIR $WM_SYSTEM_LIB_DIR
if ( ! $?SCOTCH_INCLUDE_DIR ) setenv SCOTCH_INCLUDE_DIR $WM_SYSTEM_INCLUDE_DIR
endif endif
if ( $?SCOTCH_SYSTEM == 0 && $?WM_THIRD_PARTY_USE_SCOTCH_604 != 0 && -e $WM_THIRD_PARTY_DIR/packages/scotch-6.0.4/platforms/$WM_OPTIONS ) then if ( $?SCOTCH_SYSTEM == 0 && $?WM_THIRD_PARTY_USE_SCOTCH_604 != 0 && -e $WM_THIRD_PARTY_DIR/packages/scotch-6.0.4/platforms/$WM_OPTIONS ) then
# Using ThirdParty package for Scotch
_foamSource $WM_THIRD_PARTY_DIR/packages/scotch-6.0.4/platforms/$WM_OPTIONS/etc/scotch-6.0.4.csh _foamSource $WM_THIRD_PARTY_DIR/packages/scotch-6.0.4/platforms/$WM_OPTIONS/etc/scotch-6.0.4.csh
endif endif
if ( $?SCOTCH_SYSTEM == 0 && $?WM_THIRD_PARTY_USE_SCOTCH_600 != 0 && -e $WM_THIRD_PARTY_DIR/packages/scotch-6.0.0/platforms/$WM_OPTIONS ) then if ( $?SCOTCH_SYSTEM == 0 && $?WM_THIRD_PARTY_USE_SCOTCH_600 != 0 && -e $WM_THIRD_PARTY_DIR/packages/scotch-6.0.0/platforms/$WM_OPTIONS ) then

View file

@ -602,14 +602,6 @@ export MPI_BUFFER_SIZE
# appropriate XXX_SYSTEM environment variable for a given package in your prefs.sh # appropriate XXX_SYSTEM environment variable for a given package in your prefs.sh
# file in order to disable the activation of the ThirdParty version of the same package. # file in order to disable the activation of the ThirdParty version of the same package.
# Default locations for pre-installed version of the ThirdParty packages
# Use prefs.sh to pre-initialize to different default values, accordingly to
# your Linux/Unix flavour
: ${WM_SYSTEM_DIR:=/usr}; export WM_SYSTEM_DIR
: ${WM_SYSTEM_BIN_DIR:=$WM_SYSTEM_DIR/bin}; export WM_SYSTEM_BIN_DIR
: ${WM_SYSTEM_LIB_DIR:=$WM_SYSTEM_DIR/lib}; export WM_SYSTEM_LIB_DIR
: ${WM_SYSTEM_INCLUDE_DIR:=$WM_SYSTEM_DIR/include}; export WM_SYSTEM_INCLUDE_DIR
# Load Mesquite library # Load Mesquite library
# ~~~~~~~~~~~~~~~~~~~~~~ # ~~~~~~~~~~~~~~~~~~~~~~
[ -z "$MESQUITE_SYSTEM" ] && [ ! -z $WM_THIRD_PARTY_USE_MESQUITE_212 ] && [ -e $WM_THIRD_PARTY_DIR/packages/mesquite-2.1.2/platforms/$WM_OPTIONS ] && { [ -z "$MESQUITE_SYSTEM" ] && [ ! -z $WM_THIRD_PARTY_USE_MESQUITE_212 ] && [ -e $WM_THIRD_PARTY_DIR/packages/mesquite-2.1.2/platforms/$WM_OPTIONS ] && {
@ -624,41 +616,31 @@ export MPI_BUFFER_SIZE
# Load Metis library # Load Metis library
# ~~~~~~~~~~~~~~~~~~ # ~~~~~~~~~~~~~~~~~~
if [ ! -z "$METIS_SYSTEM" ] [ ! -z "$METIS_SYSTEM" ] && {
then export METIS_DIR=/usr
# Using system libraries. export METIS_BIN_DIR=/usr/bin
# Some values might already be pre-initialized in prefs.sh export METIS_LIB_DIR=/lib
# If not, use the default WM_SYSTEM_XXX values export METIS_INCLUDE_DIR=/usr/include
: ${METIS_DIR:=$WM_SYSTEM_DIR}; export METIS_DIR }
: ${METIS_BIN_DIR:=$WM_SYSTEM_BIN_DIR}; export METIS_BIN_DIR
: ${METIS_LIB_DIR:=$WM_SYSTEM_LIB_DIR}; export METIS_LIB_DIR [ -z "$METIS_SYSTEM" ] && [ ! -z $WM_THIRD_PARTY_USE_METIS_510 ] && [ -e $WM_THIRD_PARTY_DIR/packages/metis-5.1.0/platforms/$WM_OPTIONS ] && {
: ${METIS_INCLUDE_DIR:=$WM_SYSTEM_INCLUDE_DIR}; export METIS_INCLUDE_DIR
else
# Using ThirdParty package for Metis
[ ! -z $WM_THIRD_PARTY_USE_METIS_510 ] && [ -e $WM_THIRD_PARTY_DIR/packages/metis-5.1.0/platforms/$WM_OPTIONS ] && {
_foamSource $WM_THIRD_PARTY_DIR/packages/metis-5.1.0/platforms/$WM_OPTIONS/etc/metis-5.1.0.sh _foamSource $WM_THIRD_PARTY_DIR/packages/metis-5.1.0/platforms/$WM_OPTIONS/etc/metis-5.1.0.sh
} }
fi
[ "$FOAM_VERBOSE" -a "$PS1" ] && echo " METIS_DIR is initialized to: $METIS_DIR" [ "$FOAM_VERBOSE" -a "$PS1" ] && echo " METIS_DIR is initialized to: $METIS_DIR"
# Load ParMetis library # Load ParMetis library
# ~~~~~~~~~~~~~~~~~~~~~ # ~~~~~~~~~~~~~~~~~~~~~
if [ ! -z "$PARMETIS_SYSTEM" ] [ ! -z "$PARMETIS_SYSTEM" ] && {
then export PARMETIS_DIR=/usr
# Using system libraries export PARMETIS_BIN_DIR=/usr/bin
# Some values might already be pre-initialized in prefs.sh export PARMETIS_LIB_DIR=/lib
# If not, use the default WM_SYSTEM_XXX values export PARMETIS_INCLUDE_DIR=/usr/include
: ${PARMETIS_DIR:=$WM_SYSTEM_DIR}; export PARMETIS_DIR }
: ${PARMETIS_BIN_DIR:=$WM_SYSTEM_BIN_DIR}; export PARMETIS_BIN_DIR
: ${PARMETIS_LIB_DIR:=$WM_SYSTEM_LIB_DIR}; export PARMETIS_LIB_DIR [ -z "$PARMETIS_SYSTEM" ] && [ ! -z $WM_THIRD_PARTY_USE_PARMETIS_403 ] && [ -e $WM_THIRD_PARTY_DIR/packages/parmetis-4.0.3/platforms/$WM_OPTIONS ] && {
: ${PARMETIS_INCLUDE_DIR:=$WM_SYSTEM_INCLUDE_DIR}; export PARMETIS_INCLUDE_DIR
else
# Using ThirdParty package for ParMetis
[ ! -z $WM_THIRD_PARTY_USE_PARMETIS_403 ] && [ -e $WM_THIRD_PARTY_DIR/packages/parmetis-4.0.3/platforms/$WM_OPTIONS ] && {
_foamSource $WM_THIRD_PARTY_DIR/packages/parmetis-4.0.3/platforms/$WM_OPTIONS/etc/parmetis-4.0.3.sh _foamSource $WM_THIRD_PARTY_DIR/packages/parmetis-4.0.3/platforms/$WM_OPTIONS/etc/parmetis-4.0.3.sh
} }
fi
[ "$FOAM_VERBOSE" -a "$PS1" ] && echo " PARMETIS_DIR is initialized to: $PARMETIS_DIR" [ "$FOAM_VERBOSE" -a "$PS1" ] && echo " PARMETIS_DIR is initialized to: $PARMETIS_DIR"
@ -680,24 +662,21 @@ fi
# Load Scotch library # Load Scotch library
# ~~~~~~~~~~~~~~~~~~~ # ~~~~~~~~~~~~~~~~~~~
if [ ! -z "$SCOTCH_SYSTEM" ] [ ! -z "$SCOTCH_SYSTEM" ] && {
then export SCOTCH_DIR=/usr
# Using system libraries export SCOTCH_BIN_DIR=/usr/bin
# Some values might already be pre-initialized in prefs.sh export SCOTCH_LIB_DIR=/lib
# If not, use the default WM_SYSTEM_XXX values export SCOTCH_INCLUDE_DIR=/usr/include/scotch
: ${SCOTCH_DIR:=$WM_SYSTEM_DIR}; export SCOTCH_DIR }
: ${SCOTCH_BIN_DIR:=$WM_SYSTEM_BIN_DIR}; export SCOTCH_BIN_DIR
: ${SCOTCH_LIB_DIR:=$WM_SYSTEM_LIB_DIR}; export SCOTCH_LIB_DIR [ -z "$SCOTCH_SYSTEM" ] && [ ! -z $WM_THIRD_PARTY_USE_SCOTCH_604 ] && [ -e $WM_THIRD_PARTY_DIR/packages/scotch-6.0.4/platforms/$WM_OPTIONS ] && {
: ${SCOTCH_INCLUDE_DIR:=$WM_SYSTEM_INCLUDE_DIR}; export SCOTCH_INCLUDE_DIR
else
# Using ThirdParty package for Scotch
[ ! -z $WM_THIRD_PARTY_USE_SCOTCH_604 ] && [ -e $WM_THIRD_PARTY_DIR/packages/scotch-6.0.4/platforms/$WM_OPTIONS ] && {
_foamSource $WM_THIRD_PARTY_DIR/packages/scotch-6.0.4/platforms/$WM_OPTIONS/etc/scotch-6.0.4.sh _foamSource $WM_THIRD_PARTY_DIR/packages/scotch-6.0.4/platforms/$WM_OPTIONS/etc/scotch-6.0.4.sh
} }
[ ! -z $WM_THIRD_PARTY_USE_SCOTCH_600 ] && [ -e $WM_THIRD_PARTY_DIR/packages/scotch-6.0.0/platforms/$WM_OPTIONS ] && { [ "$FOAM_VERBOSE" -a "$PS1" ] && echo " SCOTCH_DIR is initialized to: $SCOTCH_DIR"
[ -z "$SCOTCH_SYSTEM" ] && [ ! -z $WM_THIRD_PARTY_USE_SCOTCH_600 ] && [ -e $WM_THIRD_PARTY_DIR/packages/scotch-6.0.0/platforms/$WM_OPTIONS ] && {
_foamSource $WM_THIRD_PARTY_DIR/packages/scotch-6.0.0/platforms/$WM_OPTIONS/etc/scotch-6.0.0.sh _foamSource $WM_THIRD_PARTY_DIR/packages/scotch-6.0.0/platforms/$WM_OPTIONS/etc/scotch-6.0.0.sh
} }
fi
[ "$FOAM_VERBOSE" -a "$PS1" ] && echo " SCOTCH_DIR is initialized to: $SCOTCH_DIR" [ "$FOAM_VERBOSE" -a "$PS1" ] && echo " SCOTCH_DIR is initialized to: $SCOTCH_DIR"