If a package supports it you can use the
-j flag to allow parallel jobs running, e.g.:
More details on this flag can be found in the Stackoverflow question Why does make -j perform better when it is passed a number larger than the number of cores available?.
If you have multiple machines, give distcc a go. On the involved machines,
sudo apt-get install distcc. Assuming that your build machine is 192.168.1.1:
on the helper machines, run:
sudo distccd --log-file=/tmp/distccd.log --daemon -a 192.168.1.1
On the build machine, before running
cmake you have to specify hosts that you want to use for the build process. Optionally, specify the number of simultaneous jobs after a slash (defaulting to 4):
export DISTCC_HOSTS='localhost/4 192.168.1.2/8 192.168.1.3/8'
Make the compiler use distcc:
cmake the application and build with:
make -j$(distcc -j)
Note that if you've put
/usr/lib/distcc twice in your PATH, it'll fail. Be sure to set
/usr/lib/distcc only once in your
For more details, see the manual pages for distcc(1) and distccd(1).