diff --git a/compile_release.sh b/compile_release.sh index 1b559f5..0a7f4ab 100755 --- a/compile_release.sh +++ b/compile_release.sh @@ -1 +1,9 @@ -cmake -G "Unix Makefiles" -H. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build -- -j$(nproc) +#!/bin/sh + +if ! [ -x "$(command -v nproc)" ]; then + BUILD_PROC=1 +else + BUILD_PROC=$(nproc) +fi + +cmake -G "Unix Makefiles" -H. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build -- -j $BUILD_PROC