CONFIG: trap missing make command in canCompile (#2077)
This commit is contained in:
parent
db6c9c7bb2
commit
03b0ca6f2e
@ -7,7 +7,7 @@
|
|||||||
# \\/ M anipulation |
|
# \\/ M anipulation |
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Copyright (C) 2011-2015 OpenFOAM Foundation
|
# Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||||
# Copyright (C) 2019-2020 OpenCFD Ltd.
|
# Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# License
|
# License
|
||||||
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||||
@ -245,6 +245,10 @@ reportExecutable()
|
|||||||
VERSION=$(flex --version /dev/null 2>&1 \
|
VERSION=$(flex --version /dev/null 2>&1 \
|
||||||
| sed -ne 's/flex \([0-9][0-9.]*\).*/\1/p')
|
| sed -ne 's/flex \([0-9][0-9.]*\).*/\1/p')
|
||||||
;;
|
;;
|
||||||
|
make)
|
||||||
|
VERSION=$(make --version /dev/null 2>&1 \
|
||||||
|
| sed -ne 's/^.*[Mm]ake \([0-9][0-9.]*\).*/\1/p')
|
||||||
|
;;
|
||||||
wmake)
|
wmake)
|
||||||
VERSION="$(wmake --version 2>/dev/null)"
|
VERSION="$(wmake --version 2>/dev/null)"
|
||||||
;;
|
;;
|
||||||
@ -442,6 +446,7 @@ hline
|
|||||||
echo "$(fixlen Software 12) $(fixlen Version 10) $(fixlen Location 10)"
|
echo "$(fixlen Software 12) $(fixlen Version 10) $(fixlen Location 10)"
|
||||||
hline
|
hline
|
||||||
reportExecutable flex
|
reportExecutable flex
|
||||||
|
reportExecutable make
|
||||||
reportExecutable wmake
|
reportExecutable wmake
|
||||||
|
|
||||||
for compilerType in c cxx
|
for compilerType in c cxx
|
||||||
|
@ -54,13 +54,21 @@ notTest()
|
|||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
# Test for wmake and compiler suite or emit warning
|
# Test for make/wmake, compiler suite or emit warning
|
||||||
#
|
#
|
||||||
canCompile()
|
canCompile()
|
||||||
{
|
{
|
||||||
|
# system
|
||||||
|
if ! command -v make >/dev/null
|
||||||
|
then
|
||||||
|
echo "No system 'make' command found ... cannot compile" 1>&2
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# OpenFOAM-specific
|
||||||
if ! command -v wmake >/dev/null
|
if ! command -v wmake >/dev/null
|
||||||
then
|
then
|
||||||
echo "No wmake command found ... cannot compile" 1>&2
|
echo "No openfoam 'wmake' command found ... cannot compile" 1>&2
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -69,7 +77,7 @@ canCompile()
|
|||||||
|
|
||||||
if [ -z "$cxx_compiler" ]
|
if [ -z "$cxx_compiler" ]
|
||||||
then
|
then
|
||||||
echo "No wmake rule for C++ compiler? ... cannot compile" 1>&2
|
echo "No wmake rule for C++ compiler ... cannot compile" 1>&2
|
||||||
return 1
|
return 1
|
||||||
elif ! command -v "$cxx_compiler" >/dev/null
|
elif ! command -v "$cxx_compiler" >/dev/null
|
||||||
then
|
then
|
||||||
|
Loading…
Reference in New Issue
Block a user