[CMake] CTest - Speed Optimization

Bill Hoffman bill.hoffman at kitware.com
Thu Oct 31 14:31:07 EDT 2013


On 10/31/2013 1:17 PM, Stephen Kelly wrote:
>> >There is a -j flag for ctest, which at enables parallel testing. Not sure
>> >whether it enables also parallel building.
> I don't know, but I hope not. That wouldn't be a good idea because it would
> try to do N*N things at once instead of N things at once, with make.
No, it would not.  It does the build first, then it does the tests. 
However, the -j to ctest only affects the tests.

If you configure your build with this option:
-DMAKECOMMAND:STRING=make -j8

Then ctest will build in parallel.

-Bill



More information about the CMake mailing list