When I build my project with cmake I usually use the command line
cmake --build . -- -j4
when using make, or
cmake --build . -- /maxcpucount:4
when using MSBuild
Repeating this all the time is annoying and I would rather set this in the CMakeLists file instead of writing it in the command line.
I am wondering if there is a cmake variable that can hold additional options for the make tool which I could set to -j4
or /maxcpucount:4
depending on which CMAKE_MAKE_PROGRAM
is used.
Thank you for your time.