cmake: Fix global generator path style in --build mode
Fix the --build
code path so that cmSystemTools::SetForceUnixPaths
is called with the global generator's path style. This makes forwarding
of --target subdir/src.c.obj
match the slash style the generator
placed in the build system.
Fixes: #17742 (closed)