Boost logo

Boost-Build :

Subject: Re: [Boost-build] Programmatic Job Count
From: Kirit Sælensminde (kirit.saelensminde_at_[hidden])
Date: 2008-11-21 09:49:04


Phillip Seaver wrote:
> One thing that I've thought of a few times related to this is a special
> value to "-j" that tells it to match the number of CPU's. So, on my
> 4-core machine, it would be as if I had typed "-j4". If I can use it
> from site-config.jam or user-config.jam, though, that idea is a little
> less needed. :-)

We use build scripts for Boost that ensure that we get a consistent
build and they fill in the number of processors they find on the machine.

On our Ubuntu machines this works:
bjam -j`grep -c ^processor /proc/cpuinfo`

And on Windows this does:
bjam -j%NUMBER_OF_PROCESSORS%

The scripts are available at svn://svn.felpar.com/external/Boost
Username is 'guest', blank password.

Kirit


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk