[CMake] Parallel build setup question
Cornelis Bockemühl
cornelis at bockemuehl.ch
Fri Feb 16 11:31:16 EST 2018
Hello,
Somehow I seem to miss some crucial point regarding setup for parallel
build with CMake, so I would be happy if somebody can push me the last
few millimeters to hit my target!
My configuration is on OpenSuse Linux (Leap - 64-bit), working with
QtCreator and CMake, using the "make" configuration.
I learned from "the internet" that actually I would have to pass a -jN
option to make or gmake (with N being the max number of processors I
want to use). Or even more elegant: go for a -lN option to somehow
balance the load. Sounds good!
But what I do not see is how to pass these nice options to make through
CMake and QtCreator! One attempt was to specify CMAKE_CXX_FLAGS=-j4 or
the like because some comment "in the internet" seemed to suggest this.
However, like I already feared: this passes the option to the compiler
call - and that is the wrong address for it, so I get an error message.
Basically I think that it is 99% a CMake question and maximum 1% a
QtCreator problem, so I am asking this question here.
And now I am stuck - if not some friendly and knowing person can help
me out of this!
Thanks for any helpful hint!
Cornelis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake/attachments/20180216/457d1af4/attachment.html>
More information about the CMake
mailing list