Not sure if this is what you want but you can use an environment variable like this
make -j %(NUMBER_OF_PROCESSORS) -f makefile
For Windows, NUMBER_OF_PROCESSORS is a system environment variable.
See this post for how to set environment variables for a workspace
https://community.slickedit.com/index.php/topic,16714.msg64622.html#msg64622so you could have
void _workspace_opened_set_cpus()
{
switch ( _workspace_filename ) {
case 'whatever' :
set_env('NUM_CPUS', (_str)((int)get_env('NUMBER_OF_PROCESSORS') + 2));
default:
set_env('NUM_CPUS', (_str)((int)get_env('NUMBER_OF_PROCESSORS') + 1));
}
}
Then
make -j %(NUM_CPUS) -f makefile
For Linux - don't know. You might have to run a shell script to set an environment variable.
execute('my_shell_script.sh');
execute is a slick C command.