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
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
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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
# ~~~~~~~~~~~~~~~~~~~~~~~~~~
if ( $?METIS_SYSTEM) then
# Using system libraries.
# Some values might already be pre-initialized in prefs.sh
# If not, use the default WM_SYSTEM_XXX values
if ( ! $?METIS_DIR ) setenv METIS_DIR $WM_SYSTEM_DIR
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
setenv METIS_DIR /usr
setenv METIS_BIN_DIR /usr/bin
setenv METIS_LIB_DIR /lib
setenv METIS_INCLUDE_DIR /usr/include
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
# Using ThirdParty package for Metis
_foamSource $WM_THIRD_PARTY_DIR/packages/metis-5.1.0/platforms/$WM_OPTIONS/etc/metis-5.1.0.csh
endif
# ParMetis library if available
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
if ( $?PARMETIS_SYSTEM) then
# Using system libraries.
# Some values might already be pre-initialized in prefs.sh
# If not, use the default WM_SYSTEM_XXX values
if ( ! $?PARMETIS_DIR ) setenv PARMETIS_DIR $WM_SYSTEM_DIR
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
setenv PARMETIS_DIR /usr
setenv PARMETIS_BIN_DIR /usr/bin
setenv PARMETIS_LIB_DIR /lib
setenv PARMETIS_INCLUDE_DIR /usr/include
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
# Using ThirdParty package for ParMetis
_foamSource $WM_THIRD_PARTY_DIR/packages/parmetis-4.0.3/platforms/$WM_OPTIONS/etc/parmetis-4.0.3.csh
endif
@ -574,16 +551,12 @@ endif
# Scotch library if available
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~
if ( $?SCOTCH_SYSTEM) then
# Using system libraries.
# Some values might already be pre-initialized in prefs.sh
# If not, use the default WM_SYSTEM_XXX values
if ( ! $?SCOTCH_DIR ) setenv SCOTCH_DIR $WM_SYSTEM_DIR
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
setenv SCOTCH_DIR /usr
setenv SCOTCH_BIN_DIR /usr/bin
setenv SCOTCH_LIB_DIR /lib
setenv SCOTCH_INCLUDE_DIR /usr/include/scotch
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
# Using ThirdParty package for Scotch
_foamSource $WM_THIRD_PARTY_DIR/packages/scotch-6.0.4/platforms/$WM_OPTIONS/etc/scotch-6.0.4.csh
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

View file

@ -602,14 +602,6 @@ export MPI_BUFFER_SIZE
# 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
: ${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
# ~~~~~~~~~~~~~~~~~~~~~~
[ -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
# ~~~~~~~~~~~~~~~~~~
if [ ! -z "$METIS_SYSTEM" ]
then
# Using system libraries.
# Some values might already be pre-initialized in prefs.sh
# If not, use the default WM_SYSTEM_XXX values
: ${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
: ${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 ] && {
[ ! -z "$METIS_SYSTEM" ] && {
export METIS_DIR=/usr
export METIS_BIN_DIR=/usr/bin
export METIS_LIB_DIR=/lib
export METIS_INCLUDE_DIR=/usr/include
}
[ -z "$METIS_SYSTEM" ] && [ ! -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
}
fi
}
[ "$FOAM_VERBOSE" -a "$PS1" ] && echo " METIS_DIR is initialized to: $METIS_DIR"
# Load ParMetis library
# ~~~~~~~~~~~~~~~~~~~~~
if [ ! -z "$PARMETIS_SYSTEM" ]
then
# Using system libraries
# Some values might already be pre-initialized in prefs.sh
# If not, use the default WM_SYSTEM_XXX values
: ${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
: ${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 ] && {
[ ! -z "$PARMETIS_SYSTEM" ] && {
export PARMETIS_DIR=/usr
export PARMETIS_BIN_DIR=/usr/bin
export PARMETIS_LIB_DIR=/lib
export PARMETIS_INCLUDE_DIR=/usr/include
}
[ -z "$PARMETIS_SYSTEM" ] && [ ! -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
}
fi
}
[ "$FOAM_VERBOSE" -a "$PS1" ] && echo " PARMETIS_DIR is initialized to: $PARMETIS_DIR"
@ -680,24 +662,21 @@ fi
# Load Scotch library
# ~~~~~~~~~~~~~~~~~~~
if [ ! -z "$SCOTCH_SYSTEM" ]
then
# Using system libraries
# Some values might already be pre-initialized in prefs.sh
# If not, use the default WM_SYSTEM_XXX values
: ${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
: ${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 ] && {
[ ! -z "$SCOTCH_SYSTEM" ] && {
export SCOTCH_DIR=/usr
export SCOTCH_BIN_DIR=/usr/bin
export SCOTCH_LIB_DIR=/lib
export SCOTCH_INCLUDE_DIR=/usr/include/scotch
}
[ -z "$SCOTCH_SYSTEM" ] && [ ! -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
}
[ ! -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
}
fi
[ "$FOAM_VERBOSE" -a "$PS1" ] && echo " SCOTCH_DIR is initialized to: $SCOTCH_DIR"