Is there a way to build using multiple cores to reduce build times?
I was looking at videos on how to reduce compile times, the suggestions were as follows:
Buy a better computer : \
Code better D :
Multicore Builds w/ Cmake : D
So seeing as I don't want to buy a new computer, and optimizing my includes sounds like a smart idea (hence not worth doing), I was wondering if I could use multiple processors on my computer to build. Upon a quick google search I found the holy grail, the golden spatula, the scott sterling:
make -j [Processor Count]
However, this doesnโt work with the Pros Integrated Terminal:
โญโ Error โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ No such option: -j D : - Sad โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
Therefore, does anyone else know if there is there a way to build with multiple processes?
Alternatively, could I have Makefile tools build with multiple processors?
(I have the extension for VsCode)
Thanks,
Andy Hilty
2131H Anatidaephobia
[Pros User, VsCode extension]
pros make just runs make under the hood, so you can skip past the pros wrapper and just run make yourself directly if you want (I just tested and it works). Thereโs probably a way to put this in your projectโs Makefile so you donโt need to specify it all the time and pros make will work with it, but I donโt really have time to get into it right now
Also, thanks for pointing this out, I didnโt know this was a thing and itโs gonna save me a ton of time this year lol.
You should be able to pass arguments directly to make in our CLI. iirc the syntax was something along the lines of pros make -- -j whatever, where there is a -- and a space after to signify all the following arguments are to be eaten up by the click argument with nargs=-1, which in the case of the pros build commands is the arguments that should be passed to the make executable
Is there a way to make it so that when I press the Build and Download or the Build button in the pros extension it runs the pros make -- -j 4 Instead of pros make or what it normally runs?