[CMake] How to get Visual Studio to use more than a single core for compiling
Mateusz Loskot
mateusz at loskot.net
Tue Nov 27 09:41:33 EST 2012
On 27 November 2012 14:23, John Drescher <drescherjm at gmail.com> wrote:
> On Tue, Nov 27, 2012 at 7:21 AM, Michael Jackson
> <mike.jackson at bluequartz.net> wrote:
> >
> >
> > On Nov 27, 2012, at 12:46 AM, Titus von Boxberg <titus at v9g.de> wrote:
> >
> >> Am 27.11.2012 05:24, schrieb Michael Jackson:
> >>> That will teach me to hit enter in GMail..
> >>>
> >>> My question is this: What is the magic CMake incantation to get Visual
> >>> Studio 2010 to use more than a single processor when compiling my
> >>> project?
> >> You could add /MP to CMAKE_C_FLAGS and CMAKE_CXX_FLAGS
> >>
> >> Regards
> >> Titus
> >> --
> >>
> >
> >
> > Thanks for the tip. I'll give it a try.
>
> I can tell you that sometimes its hard to get Visual Studio to make
> good use of your cores (especially if you have 8 or 12 threads) even
> though multithreded building is on. I believe there are too many parts
> of the chain that are single threaded only.
It's fairly easy to make both, VS and cl.exe, utilise multiple cores,
even using command line. The problem is that build configurations like
NMAKE require significant gymnastics:
http://public.kitware.com/pipermail/cmake/2012-September/052116.html
It is easier with VS projects:
http://www.cmake.org/pipermail/cmake/2009-April/028669.html
Best regards,
--
Mateusz Loskot, http://mateusz.loskot.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20121127/aa33d2b7/attachment.htm>
More information about the CMake
mailing list