More minor improvements to scripts.

This commit is contained in:
Julian Frohmüller
2022-12-04 22:28:25 +01:00
parent c0d66ce708
commit 5cf27fc5e8
2 changed files with 14 additions and 6 deletions
+7 -3
View File
@@ -1,7 +1,7 @@
[ ! -d build ] && mkdir build
echo "Configuring..."
cmake -S . -B ./build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=./Release
cmake -S . -B ./build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=./Release $@
if [ $? -ne 0 ]; then
echo "CMake failed. Aborting."
@@ -10,9 +10,13 @@ else
echo "CMake succeeded."
fi
echo "Building..."
if [ -z "$THREADS" ]; then
THREADS=$(grep -c ^processor /proc/cpuinfo 2>/dev/null || sysctl -n hw.ncpu 2>/dev/null || echo 1)
fi
echo "Building with $THREADS threads..."
cd build
make
make -j$THREADS
if [ $? -ne 0 ]; then
echo "Build failed. Aborting."
+7 -3
View File
@@ -1,7 +1,7 @@
[ ! -d build ] && mkdir build
echo "Configuring..."
cmake -S . -B ./build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local/
cmake -S . -B ./build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local/ $@
if [ $? -ne 0 ]; then
echo "CMake failed. Aborting."
@@ -10,9 +10,13 @@ else
echo "CMake succeeded."
fi
echo "Building..."
if [ -z "$THREADS" ]; then
THREADS=$(grep -c ^processor /proc/cpuinfo 2>/dev/null || sysctl -n hw.ncpu 2>/dev/null || echo 1)
fi
echo "Building with $THREADS threads..."
cd build
make
make -j$THREADS
if [ $? -ne 0 ]; then
echo "Build failed. Aborting."