Pros Make using multicore builds?

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:
  1. Buy a better computer : \
  2. Code better D :
  3. 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]

2 Likes

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

2 Likes

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?

Currently there is not, sorry. We should be able to implement that however, I will add it to our task list.

I could be wrong, but adding MAKEFLAGS=-j8 to the Makefile seems to have done the trick for me, for both the command line and the build button