From b01bc7a52e091421be98f8bf670232402e17c3fe Mon Sep 17 00:00:00 2001 From: Andrey Astafyev Date: Wed, 25 Mar 2020 10:23:32 +0300 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D0=BE=D0=BB=D1=8C=D0=B7?= =?UTF-8?q?=D0=BE=D0=B2=D0=B0=D1=82=D1=8C=20make=20=D0=BF=D1=80=D0=BE?= =?UTF-8?q?=D0=B5=D0=BA=D1=82=D0=BE=D0=B2=20=D0=BD=D0=B0=20Fortran?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cmake.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/cmake.sh b/cmake.sh index 2d3526f..6145a14 100755 --- a/cmake.sh +++ b/cmake.sh @@ -86,6 +86,15 @@ CMAKE_ARGS="" [ ! -f "${SOURCE_DIR}/CMakeLists.txt" ] && { echo "Source directory does not contain CMakeLists.txt"; exit 4; } +if grep -i ^"project.*fortran" "${SOURCE_DIR}/CMakeLists.txt" >/dev/null 2>&1 ; then + if [ -x "$(command -v make)" ]; then + GENERATOR="Unix Makefiles" + else + echo "Projects with Fortran sources need Make to build" + exit 5 + fi +fi + export GENERATOR export SOURCE_DIR export BUILD_DIR