diff options
Diffstat (limited to 'mkbuild.sh')
-rwxr-xr-x | mkbuild.sh | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/mkbuild.sh b/mkbuild.sh new file mode 100755 index 0000000..9f70321 --- /dev/null +++ b/mkbuild.sh @@ -0,0 +1,17 @@ +#/bin/sh + +h="$(dirname $0)" + +mkdir -p "$h/build" || exit +cd "$h/build" || exit + +[ "$1" = "-f" ] && { rm -r * 2>/dev/null; shift; } +[ "$1" = "--force" ] && { rm -r * 2>/dev/null; shift; } + +cmake \ + -DCMAKE_BUILD_TYPE=Debug \ + -DCMAKE_INSTALL_PREFIX=~/.local \ + .. + +make -j "$@" + |