cmake --build: Fix exit code when building multiple targets

Updated the cmGlobalGenerator::Build method to check the return `retVal`
parameter supplied to the `cmSystemTools::RunSingleCommand` to validate
that each invocation of the build command returned an exit code of zero.

Fixes: #20790
1 file changed