Thanks. I will try it. Without hard coding, how does one propagate to sub-folders? I would like to use it also in building PyQt5 and that has about 10 sub-folders with Makefiles.
-----Original Message----- From: Qgis-developer [mailto:[email protected]] On Behalf Of Matthias Kuhn Sent: Sunday, April 2, 2017 11:40 AM To: Sebastiaan Couwenberg <[email protected]> Cc: [email protected] Subject: Re: [Qgis-developer] Processor Count 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 parallel. Many of the QGIS devs started to appreciate this. Matthias 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 > _______________________________________________ Qgis-developer mailing list [email protected] List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer _______________________________________________ Qgis-developer mailing list [email protected] List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
