This is just how CMake works: each of its "rules" is concrete; you cannot create a "template rule". The reason for that is platform independence: not every build systems supports "templates" for rules.
No idea if Stackoverflow Guy is correct here, but if so ... eh what? Make exists, and make supports pattern rules, and both these things have been true for several decades longer than CMake has existed, so why do we give a stuff about "platform independence"