CI: expand documentation of build.sh a bit, extra sanity checks

This commit is contained in:
Adriaan de Groot 2024-02-22 20:10:56 +01:00
parent 36dfedfea5
commit 49f13c30a5

View File

@ -1,10 +1,14 @@
#! /bin/sh
#
# Generic build (driven by environment variables)
# Generic build. The build is driven by environment variables:
# - SRCDIR (e.g. /src)
# - BUILDDIR (e.g. /build)
# - CMAKE_ARGS (e.g. "-DWITH_QT6=ON -DCMAKE_BUILD_TYPE=Debug")
#
# Sanity check
test -n "$BUILDDIR" || { echo "! \$BUILDDIR not set" ; exit 1 ; }
test -n "$SRCDIR" || { echo "! \$SRCDIR not set" ; exit 1 ; }
mkdir -p "$BUILDDIR"
test -f "$SRCDIR/CMakeLists.txt" || { echo "! Missing $SRCDIR/CMakeLists.txt" ; exit 1 ; }