Factor the implementation out of cmGlobalGenerator.
cmGlobalGenerator
Split out of !7500 (closed).
Backport: release