Subject: [Boost-build] Influencing the build order of source files to speed up the overall build process
From: Thomas Bretgeld (thomas.bretgeld_at_[hidden])
Date: 2011-08-02 13:06:17
is there any way to influence the build order of source files for an executable? I have been comparing build times from a Make project to my new bjam
confiugration (which builds fine) and found out that the compilation using bjam takes significantly longer. The reason seems to be quite simple:
I am using an Intel Core i7 Quadcore with 8 parallel threads (bjam -j8) but there is one single source file that takes very long to build compared to
all others (spirit parser grammer) and bjam accidentally builds this file last. So while building this file 7 out of 8 virtual processors have nothing
to do and everything is waiting for this single file to finish. What I would like to do is make bjam build this file first to reduce the overall build
time. Changing the order of source files in the Jamfile doesn't seem to work. Is there anything I could do? How does bjam calculate the build order?
Regarding parallel build, I would also like to know if it its possible to define a default number of parallel jobs somewhere, so that I do not need to
write it on each invocation of bjam manually? Maybe through some kind of environment variable or configuration file?
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