Skip to content

Commit

Permalink
scripts/cmake-helper.sh: add 'set -e'
Browse files Browse the repository at this point in the history
  • Loading branch information
ebiggers committed Mar 24, 2023
1 parent 1cea23c commit 736f40e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scripts/cmake-helper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@
# This script ensures that the 'build' directory has been created and configured
# with the given CMake options and environment.

set -e

TOPDIR="$(dirname "$0")"/..
BUILDDIR="$TOPDIR"/build

flags=$(env; echo "@CMAKEOPTS@=$*")
if [ "$flags" != "$(cat "$BUILDDIR"/.flags 2>/dev/null)" ]; then
if [ "$flags" != "$(cat "$BUILDDIR"/.flags 2>/dev/null || true)" ]; then
rm -rf "$BUILDDIR"/CMakeCache.txt "$BUILDDIR"/CMakeFiles
mkdir -p "$BUILDDIR"
cmake -S "$TOPDIR" -B "$BUILDDIR" "$@"
Expand Down

0 comments on commit 736f40e

Please sign in to comment.