Merge topic 'add-generator-target-caches'

f69d1872db cmGeneratorTarget: Add caches to some functions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !7952