cmGeneratorTarget: store synthetic targets in its cache

The synthetic target cache was never actually updated, so record them in
the cache so that reuses can actually be discovered.

Fixes: #25568
1 file changed