Verify build mode transitions and propagate GUI job counts
This commit is contained in:
1 parent
ff9d205d5b
commit
ff2eae2efb
3 files changed
+213
-2
No files matched your search
+13
-2
@@ -14,6 +14,18 @@ log ""
|
||||
SRC_DIR="$(cd "$(dirname "$0")" && pwd)"
|
||||
BUILD_DIR="$SRC_DIR/build"
|
||||
RUNTIME_PREFIX="${MSYSTEM_PREFIX:-/ucrt64}"
|
||||
JOBS=$(nproc 2>/dev/null || echo 4)
|
||||
while [[ $# -gt 0 ]]; do
|
||||
case "$1" in
|
||||
-j)
|
||||
[[ $# -gt 1 ]] || { log "ERROR: -j requires a positive job count"; exit 1; }
|
||||
shift; JOBS=$1 ;;
|
||||
-j*) JOBS=${1#-j} ;;
|
||||
*) log "ERROR: unknown argument: $1"; exit 1 ;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
[[ "$JOBS" =~ ^[1-9][0-9]*$ ]] || { log "ERROR: invalid job count: $JOBS"; exit 1; }
|
||||
|
||||
log "Source: $SRC_DIR"
|
||||
log "Build: $BUILD_DIR"
|
||||
@@ -36,7 +48,7 @@ if [ "${MSYSTEM:-}" = UCRT64 ]; then
|
||||
-DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON 2>&1 | tee -a "$LOG_FILE" || {
|
||||
log " ERROR: bundled rlottie configure failed"; exit 1;
|
||||
}
|
||||
cmake --build "$SRC_DIR/rlottie_build" --target rlottie --parallel 4 2>&1 | tee -a "$LOG_FILE" || {
|
||||
cmake --build "$SRC_DIR/rlottie_build" --target rlottie --parallel "$JOBS" 2>&1 | tee -a "$LOG_FILE" || {
|
||||
log " ERROR: bundled rlottie build failed"; exit 1;
|
||||
}
|
||||
log " OK: bundled rlottie ready in $SRC_DIR/rlottie_build"
|
||||
@@ -47,7 +59,6 @@ cmake -S "$SRC_DIR" -B "$BUILD_DIR" -G Ninja 2>&1 | tee -a "$LOG_FILE"
|
||||
test ${PIPESTATUS[0]} -eq 0 || { log "CMake configure FAILED"; exit 1; }
|
||||
|
||||
log ""
|
||||
JOBS=$(nproc 2>/dev/null || echo 4)
|
||||
log "[2/4] Building (parallel: $JOBS jobs)..."
|
||||
cmake --build "$BUILD_DIR" -j"$JOBS" 2>&1 | tee -a "$LOG_FILE"
|
||||
test ${PIPESTATUS[0]} -eq 0 || { log "Build FAILED"; exit 1; }
|
||||
|
||||
Reference in new issue
Block a user