Commit 43cbb24d authored by Mark Olesen's avatar Mark Olesen
Browse files

COMP: check for wmake toolchain when building third-party (fixes #30)

parent f49d26da
...@@ -92,6 +92,29 @@ whichMpicc() ...@@ -92,6 +92,29 @@ whichMpicc()
echo "${mpicc:-mpicc}" echo "${mpicc:-mpicc}"
} }
# The presence of wmkdep etc required for building with wmake
requireWMakeToolchain()
{
local dir="${WM_DIR:-$WM_PROJECT_DIR/wmake}"
local src="$dir/src"
local bin="$dir/platforms/$WM_ARCH$WM_COMPILER/wmkdep"
test -x $bin || {
echo "Warning: the 'wmkdep' binary is missing - attempting to build it"
( cd $src && make -s )
}
test -x $bin || {
exec 1>&2
echo
echo "Error: cannot use wmake build for '${0##*/}"
echo " The 'wmkdep' binary is missing"
echo " Please run the top-level OpenFOAM Allwmake first"
echo
exit 1
}
}
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# Some functions as per OpenFOAM etc/config.sh/functions # Some functions as per OpenFOAM etc/config.sh/functions
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration | # \\ / O peration |
# \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation # \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
# \\/ M anipulation | Copyright (C) 2016-2017 OpenCFD Ltd. # \\/ M anipulation | Copyright (C) 2016-2018 OpenCFD Ltd.
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# License # License
# This file is part of OpenFOAM, licensed under GNU General Public License # This file is part of OpenFOAM, licensed under GNU General Public License
...@@ -89,6 +89,8 @@ do ...@@ -89,6 +89,8 @@ do
shift shift
done done
requireWMakeToolchain
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# #
# Build LIBCCMIO # Build LIBCCMIO
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
# ========= | # ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration | # \\ / O peration |
# \\ / A nd | Copyright (C) 2017 OpenCFD Ltd. # \\ / A nd | Copyright (C) 2017-2018 OpenCFD Ltd.
# \\/ M anipulation | # \\/ M anipulation |
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# License # License
...@@ -119,6 +119,8 @@ then ...@@ -119,6 +119,8 @@ then
exit 0 exit 0
fi fi
requireWMakeToolchain
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# #
# Build KaHIP # Build KaHIP
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment