1 2 3 4 5 6 7 8
#!/bin/sh NCORES=$(grep -c "^processor" /proc/cpuinfo 2>/dev/null) mkdir -p build cd build/ cmake .. make -s -j $NCORES