[Qgis-developer] Processor Count

Sebastiaan Couwenberg sebastic at xs4all.nl
Sun Apr 2 10:31:03 PDT 2017


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

-- 
 GPG Key ID: 4096R/6750F10AE88D4AF1
Fingerprint: 8182 DE41 7056 408D 6146  50D1 6750 F10A E88D 4AF1


More information about the Qgis-developer mailing list