[CMake] Build several targets using cmake --build <dir>

J Decker d3ck0r at gmail.com
Fri Mar 15 07:37:18 EDT 2013


If the dependencies are already satisfied, and the cmake_make_program can
run mutliple in parallel, then it works great.

I have a cmake script that builds other cmake top level projects; and this
ends up building in parallel on visual studio.

can't do it with any other compiler I use for windows (make can be aliased
on linux to include a /j4).

On Fri, Mar 15, 2013 at 1:37 AM, Gregoire Aujay <gaujay at movea.com> wrote:

> Hello,
>
> Thanks for your replies. I understand that I can only 'cmake --build' one
> target at a time.
> I think that the solutions you propose do not benefit from tools, like
> ninja, that have parallel build capabilities.
>
> I'll file a feature request.
>
> Regards,
> Greg
>
> -----Original Message-----
> From: Nick Overdijk [mailto:nick at astrant.net]
> Sent: jeudi 14 mars 2013 19:10
> To: John Drescher
> Cc: Gregoire Aujay; cmake at cmake.org
> Subject: Re: [CMake] Build several targets using cmake --build <dir>
>
> You can only 'cmake' a single-target. If you want to have more targets,
> create more directories: for each target one.
>
> On 2013-14-03, at 19:07:36 , John Drescher wrote:
>
> >> I use cmake 2.8.10 on windows.
> >>
> >>
> >>
> >> I would like to build several targets with cmake --build <dir> so
> >> the underlying build tool to do parallel jobs.
> >>
> >>
> >>
> >> Currently it only seems to be possible to build one target at a time,
> >> using --target .
> >> (http://www.cmake.org/cmake/help/v2.8.10/cmake.html#opt:--builddir)
> >>
> >>
> >>
> >> Can someone tell me how I could achieve that with current cmake version?
> >>
> >>
> > I execute more than 1 cmake --build at the same time on windows. I
> > actually do this in a program called runjobs
> >
> > http://www.codeproject.com/Articles/25810/Run-All-Jobs-at-Once-Utility
> >
> > John
> > --
> >
> > 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
>
>
>
> --
>
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20130315/8bbfeabb/attachment.htm>


More information about the CMake mailing list