[CMake] parallel builds for ctest

Alan W. Irwin irwin at beluga.phys.uvic.ca
Fri Feb 15 21:53:38 EST 2008


On 2008-02-15 18:44-0500 David Cole wrote:

> One of the VTK dashboards does it by giving a custom MAKECOMMAND to the
> initial cache:MAKECOMMAND:STRING=/usr/bin/make -i -j 2
>
> See here for the full script:
> http://www.vtk.org/Testing/Sites/hythloth.kitware/Linux-gcc41/20080215-0300-Nightly/Notes.html

David, I may be leaping to conclusions here, but it appears from what you
have said that it is a reasonable hypothesis that the ctest commmand works
through the cmake generator backend.  When that is "make" (the default for
Unix systems), then it further appears you can use a parallel version of
make.  That would be a wonderful feature to have for ctest.

However, assuming the above suppositions are all true, I don't particularly
like the somewhat clumsy hardwired mechanism above which won't work very
well for machines with more than two processors or for systems where you
want to do your tests in parallel, but you might not want to do your build
in parallel (since parallel builds are difficult to get right with cmake for
projects with complicated dependencies).

One way to do this smoothly is allow ctest to pass any arguments to
the backend that the user desires.

Also, didn't "make test" work for early versions of cmake-2.4.x?  I find it
is a no-op now.  (I was thinking that "make -j N test" might be a slick way
to get parallel tests.)

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of
Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__________________________

Linux-powered Science
__________________________


More information about the CMake mailing list