[CMake] CMake 3.7.2 and parallel builds

Nils Gladitz nilsgladitz at gmail.com
Mon Jan 30 08:38:54 EST 2017


On 01/30/2017 02:26 PM, Dave Flogeras wrote:

> On Sun, Jan 29, 2017 at 9:53 AM, Nils Gladitz <nilsgladitz at gmail.com 
> <mailto:nilsgladitz at gmail.com>> wrote:
>
>     FWIW I don't think -j does anything when you build the
>     NightlyBuild target given that that make invocation is not the one
>     directly performing the actual build.
>     The only command being run by the NightlyBuild target would be
>     "ctest -D NightlyBuild" (nothing to parallelize when there is only
>     one command).
>     CTest would spawn another make process for the build.
>
>     Nils
>
>
> Good point, I checked with the older version of make (4.1) and even 
> though it doesn't issue the warning, it is not building my project in 
> parallel.
>
> I guess that brings up the obvious question:  how does one use this 
> target and take advantage of multiple processors? Basically, I'm 
> calling it within a python loop that permutes various projects and 
> configurations (release/debug/shared/static...) then puts the results 
> on a self-hosted CDash server with make NightlySubmit.

I don't know how to do this with the generic dashboard targets ... 
assuming no one else does either you could give CTest script mode a try 
(ctest -S).
In script mode the ctest_build() command has a FLAGS option which takes 
build tool specific options like -j.

Nils
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20170130/64a0c792/attachment.html>


More information about the CMake mailing list