The new Release 20.03 is out! You can download binaries for Windows and many major Linux distros here .
Hi,we are looking for a way to get the amount of cpus in a codeblocks variable that can be used in the custom makefile parameterssomething like:$make -r -R -j $cpus -f $makefile $targetis something like this available?thanks a lotmartin
$make -r -R -j `getconf _NPROCESSORS_ONLN` -f $makefile $target
$make -r -R -j $if(PLATFORM == PLATFORM_MSW){%NUMBER_OF_PROCESSORS%}{`getconf _NPROCESSORS_ONLN`} -f $makefile $target
wxWidgets has a static function to determine the umber of cpu's, but I don't know how good it works.But it could surely be used to add a cpu_count macro, that can be used wherever macro-/variable-expansion is done.
Quote from: jens on October 25, 2012, 10:29:42 pmwxWidgets has a static function to determine the umber of cpu's, but I don't know how good it works.But it could surely be used to add a cpu_count macro, that can be used wherever macro-/variable-expansion is done. We have also a setting for the number of cpus used for building, this could be provided here.
wxWidgets has a static function to determine the umber of cpu's, but I don't know how good it works.
Quote from: jens on October 25, 2012, 10:29:42 pmwxWidgets has a static function to determine the umber of cpu's, but I don't know how good it works.It works pretty well - I am using it in another of my projects (You meant the static wxThread based method, right?)
Yes
Quote from: jens on October 26, 2012, 09:36:22 amYesReminds me: Recently had the chance to work on a 16 core "enterprise PC". What a mind-blowing fast compilation of everything you do there with C::B, having setup 16 parallel build processes. Also, the wxThread methods worked fine there, too. Now all I need is somebody giving me enough money because I want to have such a beast, too. :-)