[CMake] Parallel build & test problem
David Cole
david.cole at kitware.com
Mon May 23 07:21:20 EDT 2011
On Mon, May 23, 2011 at 4:13 AM, Marcel Loose <loose at astron.nl> wrote:
> Hi all,
>
> A colleague of mine reported a bug in our CMake-base build system when
> doing a parallel build of multiple targets where one of the targets is
> 'test'.
>
> <quote>
> Running 'make -j16 tMutex test' (or any test other than tMutex)
> for example will result in building tMutex in parallel to
> testing it.
>
> Expected behaviour is first building tMutex, followed by running
> the tests.
> </quote>
>
> Is this indeed a bug? Either in our build system or in CMake?
> AFAIK it is not possible to define dependencies between the 'test'
> target and the target to build the test program. Correct?
>
> Best regards,
> Marcel Loose.
>
>
> --
> Marcel Loose
> Senior Software Engineer, Computing Group R&D, Astron, the Netherlands
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
>
To the best of my knowledge you can only do a parallel make of one target at
a time.
The best way to do what you want is to do two parallel make runs in
sequence, like this:
make -j16 tMutex
make -j16 test
The test target is defined by CMake, though, and runs all tests.
HTH,
David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20110523/967d104f/attachment.htm>
More information about the CMake
mailing list