[scripts] add build_cmake
authorPaul Brossier <piem@piem.org>
Sat, 6 Jan 2024 17:35:07 +0000 (18:35 +0100)
committerPaul Brossier <piem@piem.org>
Sat, 15 Nov 2025 09:42:52 +0000 (10:42 +0100)
scripts/build_cmake [new file with mode: 0755]

diff --git a/scripts/build_cmake b/scripts/build_cmake
new file mode 100755 (executable)
index 0000000..eddbe74
--- /dev/null
@@ -0,0 +1,16 @@
+#! /bin/sh
+
+AUBIO_BUILDDIR=$PWD/build-cmake
+#CMAKE_OPTS="-j 40"
+
+function cleanup () {
+    rm -rf $AUBIO_BUILDDIR
+}
+
+trap cleanup SIGINT SIGTERM
+
+cleanup
+
+cmake . -B $AUBIO_BUILDDIR
+VERBOSE=1 cmake --build $AUBIO_BUILDDIR $CMAKE_OPTS || exit $?
+make -C $AUBIO_BUILDDIR test $CMAKE_OPTS