CONFIG: detect newer adios library name (fixes #1911)
ENH: provide fallback prefix for cmake detection STYLE: simplify some shell syntax, avoid uname call in sysFunctions STYLE: report FOAM_MPI during mpiLib builds
This commit is contained in:
parent
f7c8e39804
commit
4cf44850a7
@ -75,6 +75,7 @@ search_adios2()
|
||||
local warn # warn="==> skip adios2"
|
||||
local incName="adios2.h"
|
||||
local libName="libadios2"
|
||||
local libName2="libadios2_cxx11_mpi"
|
||||
|
||||
local prefix="${1:-system}"
|
||||
local header library
|
||||
@ -106,6 +107,7 @@ search_adios2()
|
||||
# Library
|
||||
[ -n "$library" ] \
|
||||
|| library=$(findLibrary -prefix="$prefix" -name="$libName") \
|
||||
|| library=$(findLibrary -prefix="$prefix" -name="$libName2") \
|
||||
|| {
|
||||
[ -n "$warn" ] && echo "$warn (no library)"
|
||||
return 2
|
||||
|
@ -60,16 +60,15 @@ search_cmake()
|
||||
# Treat previous queries as "sticky"
|
||||
if [ -n "$CMAKE_EXE" ]
|
||||
then
|
||||
test "$CMAKE_EXE" != "false"
|
||||
[ "$CMAKE_EXE" != "false" ]
|
||||
return $?
|
||||
fi
|
||||
|
||||
local prefix="$1"
|
||||
local candidate foundExe
|
||||
local prefix="${1:-/usr}"
|
||||
local candidate="$prefix"/bin/cmake
|
||||
local foundExe
|
||||
|
||||
candidate="$prefix"/bin/cmake
|
||||
|
||||
if [ -d "$prefix" ] && [ -f "$candidate" ] && [ -x "$candidate" ]
|
||||
if [ -f "$candidate" ] && [ -x "$candidate" ]
|
||||
then
|
||||
foundExe="$candidate"
|
||||
elif candidate="$(command -v cmake 2>/dev/null)"
|
||||
@ -77,17 +76,17 @@ search_cmake()
|
||||
# Resolved from PATH
|
||||
foundExe="$candidate"
|
||||
fi
|
||||
# ----------------------------------
|
||||
|
||||
if [ -n "$foundExe" ]
|
||||
if [ -z "$foundExe" ]
|
||||
then
|
||||
# OK
|
||||
export HAVE_CMAKE=true
|
||||
export CMAKE_EXE="$foundExe"
|
||||
else
|
||||
# Failure
|
||||
export CMAKE_EXE="false" # Avoid repeated calls?
|
||||
return 2
|
||||
fi
|
||||
|
||||
# OK
|
||||
export HAVE_CMAKE=true
|
||||
export CMAKE_EXE="$foundExe"
|
||||
}
|
||||
|
||||
|
||||
@ -97,7 +96,7 @@ have_cmake()
|
||||
# Treat previous queries as "sticky"
|
||||
if [ -n "$CMAKE_EXE" ]
|
||||
then
|
||||
test "$CMAKE_EXE" != "false"
|
||||
[ "$CMAKE_EXE" != "false" ]
|
||||
return $?
|
||||
fi
|
||||
|
||||
|
@ -46,18 +46,21 @@ then
|
||||
DEB_TARGET_MULTIARCH=$(dpkg-architecture -qDEB_TARGET_MULTIARCH 2>/dev/null || true)
|
||||
fi
|
||||
|
||||
# True if OS is Darwin.
|
||||
# True if OS is <darwin>.
|
||||
# Test WM_ARCH for "darwin*" (lowercase) - avoid uname system call
|
||||
isDarwin()
|
||||
{
|
||||
test Darwin = "$(uname -s 2>/dev/null || true)"
|
||||
[ "${WM_ARCH#darwin}" != "${WM_ARCH}" ]
|
||||
}
|
||||
|
||||
# True if target OS is Windows
|
||||
# True if target OS is <windows>
|
||||
# Test WM_OSTYPE for or '*windows' (or '*Windows')
|
||||
isWindows()
|
||||
{
|
||||
test MSwindows = "$WM_OSTYPE"
|
||||
[ "${WM_OSTYPE%indows}" != "${WM_OSTYPE}" ]
|
||||
}
|
||||
|
||||
|
||||
# Static, dynamic library extensions
|
||||
extLibraries=".a .so"
|
||||
|
||||
@ -69,26 +72,27 @@ then
|
||||
extLibraries=".a .dll .dll.a" # including cross-compiling
|
||||
fi
|
||||
|
||||
|
||||
# True if '$1' begins with '/'
|
||||
isAbsdir()
|
||||
{
|
||||
test "$1" = "/${1#/}"
|
||||
[ "$1" = "/${1#/}" ]
|
||||
}
|
||||
|
||||
|
||||
# True if '$1' begins with '/' and also exists as a directory
|
||||
hasAbsdir()
|
||||
{
|
||||
test "$1" = "/${1#/}" -a -d "$1"
|
||||
[ "$1" = "/${1#/}" ] && [ -d "$1" ]
|
||||
}
|
||||
|
||||
|
||||
# True if '$1' is an empty string, "none" or ends in "-none"
|
||||
# Eg,
|
||||
# if isNone "$BOOST_ARCH_PATH" ...
|
||||
# if isNone "$BOOST_ARCH_PATH"
|
||||
isNone()
|
||||
{
|
||||
test -z "$1" -o "${1##*-}" = none
|
||||
[ -z "$1" ] || [ "${1##*-}" = none ]
|
||||
}
|
||||
|
||||
|
||||
@ -97,7 +101,7 @@ then
|
||||
# if isSystem "$BOOST_ARCH_PATH"
|
||||
isSystem()
|
||||
{
|
||||
test "${1##*-}" = system
|
||||
[ "${1##*-}" = system ]
|
||||
}
|
||||
|
||||
|
||||
@ -106,7 +110,7 @@ then
|
||||
# equalBaseName "/usr/include/scotch-int32" "scotch-int32"
|
||||
equalBaseName()
|
||||
{
|
||||
test "${1##*/}" = "${2##*/}"
|
||||
[ "${1##*/}" = "${2##*/}" ]
|
||||
}
|
||||
|
||||
|
||||
|
@ -310,7 +310,7 @@ wmakeLibMpi()
|
||||
sentinel=$(sameDependency "$libName" "MPLIB=$WM_MPLIB" "MPI=$FOAM_MPI" $@) || \
|
||||
wclean "$libName"
|
||||
|
||||
echo "wmake $targetType $libName (mpi=$WM_MPLIB)"
|
||||
echo "wmake $targetType $libName (mpi=$WM_MPLIB:$FOAM_MPI)"
|
||||
wmake $targetType "$libName" && \
|
||||
storeDependency "$sentinel" "MPLIB=$WM_MPLIB" "MPI=$FOAM_MPI" $@
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user