From d3a1afb2a2b59a53aacd89658a5d444ff06619e5 Mon Sep 17 00:00:00 2001 From: Sebastian Luna Valero Date: Wed, 23 May 2018 10:34:22 +0100 Subject: [PATCH] add test for C/C++ compiler --- install-CGAT-tools.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/install-CGAT-tools.sh b/install-CGAT-tools.sh index 821cf272..1f6c8567 100755 --- a/install-CGAT-tools.sh +++ b/install-CGAT-tools.sh @@ -614,6 +614,13 @@ test_release() { } +# test whether a C/C++ compiler is available +test_compilers() { + which gcc &> /dev/null || report_error " C compiler not found " + which g++ &> /dev/null || report_error " C++ compiler not found " +} + + # function to display help message help_message() { echo @@ -652,6 +659,8 @@ exit 1 # the script starts here +test_compilers + if [[ $# -eq 0 ]] ; then help_message