[Qgis-developer] Processor Count

Matthias Kuhn matthias at opengis.ch
Sun Apr 2 10:39:33 PDT 2017

Hi Gordon,

As an alternative, you can use the -GNinja argument which will cause
CMake to generate a project that uses ninja instead of make. Ninja does
some smart things by default, like for example using multiple cores in
Many of the QGIS devs started to appreciate this.


On 4/2/17 7:31 PM, Sebastiaan Couwenberg wrote:
> On 04/02/2017 07:25 PM, Gordon McLeod wrote:
>> I was wondering why the CMakeLists.txt file made no use of this CMake feature, doesn’t it work or is there some other reason?
>> Rather than `make -j4` or `make -j8` this might make it automatic.
>> >From Cmake documentation on ProcessorCount valid for AIX, cygwin, FreeBSD, HPUX, IRIX, Linux, Mac OS X, QNX, Sun and Windows:
>> include(ProcessorCount)
>> ProcessorCount(N)
>> if(NOT N EQUAL 0)
>>   set(CTEST_BUILD_FLAGS -j${N})
>>   set(ctest_test_args ${ctest_test_args} PARALLEL_LEVEL ${N})
>> endif()
> Using all CPUs by default is not very nice. Only on dedicated build
> machines is using all cores a good default, on other systems at least
> one core needs to remain available for the systems other tasks.
> Kind Regards,
> Bas

More information about the Qgis-developer mailing list