Use heuristics to select a reasonable value. Add policy CMP0162 to provide compatibility with existing projects. Fixes: #25327