cmake: backport parallel build fix to maint branch
cmake: add parallel build fix to gr_modtool template