[CMake] ctest: building test in parellel

Eric Noulard eric.noulard at gmail.com
Tue Jun 27 08:03:46 EDT 2017


2017-06-27 13:32 GMT+02:00 Damian Dixon <damian.dixon at gmail.com>:

> Hi,
>
> Is there anyway to build tests in parallel when using ctest?
>

I'm not sure to understand.
Do you want to **build** test in parallel or **run** test in parallel?


>
> I am generating makefiles on Linux.
>

Then

$ make -j 8

should build in parallel.


>
> Part of the reason I am asking this is that if I pre-build the test for
> some unknown reason ctest rebuilds the source files.
>

Then you have to verify your test dependencies. ctest should only run the
tests not build then unless you call ctest
with --build-xxx option.

How are you calling ctest?

ctest --parallel 8
or
ctest -j 8

should run tests in parallel.

This works for me (either parallel build or parallel test run) but I'm
using ninja.


Could you give us more detail on how you run cmake, make and ctest ?


-- 
Eric
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20170627/b79fa381/attachment.html>


More information about the CMake mailing list