Skip to content

Commit 815b94f

Browse files
committed
update run.sh : get the nprocs
1 parent 79af969 commit 815b94f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

run.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,13 @@ fi
6363
else
6464
echo "-- build folder already exists "
6565
fi
66+
# 获取机器的核心数
67+
CORES=$(nproc)
68+
echo "The machine has $CORES cores."
6669
cd build
6770
cmake ..
6871
make clean
69-
make -j16
72+
make -j$CORES-1
7073
echo "-- Working in the background..."
7174
spin "Running ..." &
7275
SPIN_PID=$!

0 commit comments

Comments
 (0)