Skip to content

Commit

Permalink
build_simulators.sh: detect number of jobs for building
Browse files Browse the repository at this point in the history
Now that we default to building libgmp, it makes more sense to increase
job count to number of available CPUs since there is more parallelism.
  • Loading branch information
arichardson committed Feb 14, 2025
1 parent 6346520 commit 61d8c5d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion build_simulators.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@
set -e
: "${DOWNLOAD_GMP:=TRUE}"
cmake -S . -B build -DCMAKE_BUILD_TYPE=RelWithDebInfo -DDOWNLOAD_GMP="${DOWNLOAD_GMP}"
cmake --build build -j2
jobs=$( (nproc || sysctl -n hw.ncpu || echo 2) 2>/dev/null)
cmake --build build -j${jobs}

0 comments on commit 61d8c5d

Please sign in to comment.