project/build plugin: how many cores for build tool invocation ?

Alexander Neundorf <[email protected]> Sat, 03 Feb 2024 17:08:35 +0100
Newsgroups gmane.comp.kde.devel.kwrite
Message-ID <3588891.LM0AJKV5NW@unknown0090f5ef9f13>
Hi,

I'm looking into support of the cmake file API for kate.
It can read the generated files, and it can generate the set of build commands.
Now, when using make (or cmake --build), I have to tell make how many 
processes to use in paralell using -j <n>.

What is a good way to get the number of available cores in Qt or KDE or Kate ?
Or is there already a setting like this in kate I can reuse ?

Thanks
Alex