mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
CONFIG: improve prefix matching for system libraries (#1607)
- missed detection of system libraries when installed with multiarch paths like /usr/lib/x86_64-linux-gnu CONFIG: improve handling of group/user config files (#928) - changed bashrc handling of FOAM_CONFIG_NOUSER to use FOAM_CONFIG_MODE instead. Propagate into foamEtcFile to make this a stickier control. This change allows better control, but also enables cluster installations to define their own value within the OpenFOAM prefs.sh file to prevent users accidentally mis-configuring things if necessary. - remove undocumented handling of an (a)ll mode in foamEtcFile to avoid potential pitfalls. - add support for FOAM_CONFIG_ETC handling. This allows injection of an extra search layer when finding project etc files ENH: improvements to foamConfigurePaths (#928) - handle FOAM_CONFIG_ETC implicitly, or explicitly with the new -etc option. STYLE: more explicit wording in foamConfigurePaths usage (#1602) - document that an absolute path (eg, -scotch-path) overrides/ignores the equivalent ThirdParty setting (eg, -scotch) - longer options -system-compiler and -third-compiler for -system and -third, respectively. Clearer as to their purpose. - adjust the location sanity check to look for META-INFO directory.
This commit is contained in:
@ -42,7 +42,7 @@ no_petsc()
|
||||
}
|
||||
|
||||
|
||||
# Reset variables
|
||||
# Report
|
||||
echo_petsc()
|
||||
{
|
||||
echo "petsc=${HAVE_PETSC:-false}"
|
||||
@ -52,7 +52,7 @@ echo_petsc()
|
||||
}
|
||||
|
||||
|
||||
# Provide hint for enabling
|
||||
# Hint for enabling
|
||||
hint_petsc()
|
||||
{
|
||||
/bin/cat<<INFORMATION 1>&2
|
||||
@ -101,10 +101,10 @@ have_petsc()
|
||||
elif hasAbsdir "$prefix"
|
||||
then
|
||||
header=$(findFirstFile "$prefix/include/$incName")
|
||||
library="$(findExtLib $libName)"
|
||||
library=$(findExtLib "$libName")
|
||||
elif isSystem "$prefix"
|
||||
then
|
||||
header=$(findFirstFile "/usr/local/include/$incName" "/usr/include/$incName")
|
||||
header=$(findSystemInclude -name="$incName")
|
||||
prefix=$(sysPrefix "$header")
|
||||
|
||||
# No system header, attempt discovery with pkg-config
|
||||
@ -131,10 +131,9 @@ have_petsc()
|
||||
}
|
||||
|
||||
# Library
|
||||
[ -n "$library" ] || library=$(findLibrary \
|
||||
"$prefix/lib/$libName" \
|
||||
"$prefix/lib$WM_COMPILER_LIB_ARCH/$libName" \
|
||||
) || {
|
||||
[ -n "$library" ] \
|
||||
|| library=$(findLibrary -prefix="$prefix" -name="$libName") \
|
||||
|| {
|
||||
[ -n "$warn" ] && echo "$warn (no library)"
|
||||
return 2
|
||||
}
|
||||
@ -151,7 +150,7 @@ have_petsc()
|
||||
}
|
||||
|
||||
|
||||
# Force reset of old variables
|
||||
# Reset variables
|
||||
no_petsc
|
||||
|
||||
# Testing
|
||||
|
||||
Reference in New Issue
Block a user